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

Function select_one_utxo

rust/basic_bitcoin/src/common.rs:56–67  ·  view source on GitHub ↗

Selects a single UTXO that can cover the required amount plus fee. This function is used when you need to tie a specific operation to a single UTXO, such as with Bitcoin inscriptions where the asset must be associated with specific satoshis. It searches for the first UTXO (in reverse order) that has sufficient value. Returns an error if no single UTXO has enough value to cover the payment and fe

(own_utxos: &[Utxo], amount: u64, fee: u64)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

build_transactionFunction · 0.85

Calls 2

OkClass · 0.85
iterMethod · 0.80

Tested by

no test coverage detected