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

Method handle_create_peg_out_graph_command

bridge/src/client/cli/client_command.rs:278–299  ·  view source on GitHub ↗
(
        &mut self,
        sub_matches: &ArgMatches,
    )

Source from the content-addressed store, hash-verified

276 }
277
278 pub async fn handle_create_peg_out_graph_command(
279 &mut self,
280 sub_matches: &ArgMatches,
281 ) -> io::Result<()> {
282 self.client.sync().await;
283
284 let peg_in_id = sub_matches.get_one::<String>("peg_in_id").unwrap();
285 let input = self
286 .get_funding_utxo_input(sub_matches.get_one::<String>("utxo"))
287 .await?;
288
289 let peg_out_id = self.client.create_peg_out_graph(
290 peg_in_id,
291 input,
292 CommitmentMessageId::generate_commitment_secrets(),
293 );
294
295 self.client.flush().await;
296
297 println!("Created peg-out with ID: {peg_out_id}");
298 Ok(())
299 }
300
301 pub fn get_push_nonces_command() -> Command {
302 Command::new("push-nonces")

Callers 2

mainFunction · 0.80

Calls 4

create_peg_out_graphMethod · 0.80
syncMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected