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

Method handle_peg_in_graphs

bridge/src/client/cli/query_command.rs:529–544  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

527 }
528
529 pub async fn handle_peg_in_graphs(&mut self) -> Response {
530 self.sync().await;
531 let result = self.client.get_unused_peg_in_graphs().await;
532
533 match result.len() {
534 len if len > 0 => {
535 let data =
536 Some(serde_json::to_value(result).expect("Failed to merge value vector"));
537 Response::new(ResponseStatus::OK, data)
538 }
539 _ => Response::new(
540 ResponseStatus::NOK("No available peg-in graphs found.".to_string()),
541 None,
542 ),
543 }
544 }
545
546 pub async fn generate_stub_outpoint(
547 &self,

Callers 1

mainFunction · 0.80

Calls 3

lenMethod · 0.80
syncMethod · 0.45

Tested by

no test coverage detected