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

Method generate_stub_outpoint

bridge/src/client/cli/query_command.rs:546–567  ·  view source on GitHub ↗
(
        &self,
        client: &BitVMClient,
        funding_utxo_address: &bitcoin::Address,
        input_value: Amount,
    )

Source from the content-addressed store, hash-verified

544 }
545
546 pub async fn generate_stub_outpoint(
547 &self,
548 client: &BitVMClient,
549 funding_utxo_address: &bitcoin::Address,
550 input_value: Amount,
551 ) -> OutPoint {
552 let funding_utxo = client
553 .get_initial_utxo(funding_utxo_address.clone(), input_value)
554 .await
555 .unwrap_or_else(|| {
556 panic!(
557 "Fund {:?} with {} sats at {}",
558 funding_utxo_address,
559 input_value.to_sat(),
560 client.esplora.url(),
561 );
562 });
563 OutPoint {
564 txid: funding_utxo.txid,
565 vout: funding_utxo.vout,
566 }
567 }
568}

Calls 2

get_initial_utxoMethod · 0.80
cloneMethod · 0.80

Tested by

no test coverage detected