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

Method operator_status

bridge/src/graphs/peg_in.rs:358–377  ·  view source on GitHub ↗
(&self, client: &AsyncClient)

Source from the content-addressed store, hash-verified

356 }
357
358 pub async fn operator_status(&self, client: &AsyncClient) -> PegInOperatorStatus {
359 let (peg_in_deposit_status, peg_in_confirm_status, _) =
360 Self::get_peg_in_statuses(self, client).await;
361
362 if peg_in_deposit_status.is_ok_and(|status| status.confirmed) {
363 if peg_in_confirm_status.is_ok_and(|status| status.confirmed) {
364 // peg in complete
365 PegInOperatorStatus::PegInComplete
366 } else if self.peg_in_confirm_transaction.has_all_signatures() {
367 // should execute peg-in confirm
368 PegInOperatorStatus::PegInConfirmAvailable
369 } else {
370 // peg-in confirm not yet presigned, wait
371 PegInOperatorStatus::PegInWait
372 }
373 } else {
374 // peg-in deposit not confirmed yet, wait
375 PegInOperatorStatus::PegInWait
376 }
377 }
378
379 pub fn interpret_depositor_status(
380 &self,

Calls 1

has_all_signaturesMethod · 0.45

Tested by 2