MCPcopy Create free account
hub / github.com/dfinity/examples / build_transaction_with_fee

Function build_transaction_with_fee

rust/basic_bitcoin/src/common.rs:99–176  ·  view source on GitHub ↗

Constructs a Bitcoin transaction from the given UTXOs and primary output specification. This function handles the common pattern of Bitcoin transaction construction: 1. Creates inputs from the selected UTXOs 2. Creates the primary output (payment or OP_RETURN data) 3. Adds a change output if the remainder exceeds the dust threshold 4. Returns both the unsigned transaction and previous outputs nee

(
    utxos_to_spend: Vec<&Utxo>,
    own_address: &Address,
    primary_output: &PrimaryOutput,
    fee: u64,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

build_transactionFunction · 0.85
build_transactionFunction · 0.85
build_transactionFunction · 0.85

Calls 3

OkClass · 0.85
iterMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected