]> Untitled Git - bdk/commit
Added `add_foreign_utxo`
authorLLFourn <lloyd.fourn@gmail.com>
Mon, 8 Feb 2021 04:40:56 +0000 (15:40 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Fri, 26 Feb 2021 02:33:52 +0000 (13:33 +1100)
commit1fbfeabd777855f68d07c2690ea1a629dff7971a
tree7e4a31abfa2fd4ff55c231455b36aa4c62b55972
parent9a918f285d5e830a522ac785d4e9ece84173502c
Added `add_foreign_utxo`

To allow adding UTXOs external to the current wallet.
The caller must provide the psbt::Input so we can create a coherent PSBT
at the end and so this is compatible with existing PSBT workflows.

Main changes:

- There are now two types of UTXOs, local and foreign reflected in a
`Utxo` enum.
- `WeightedUtxo` now captures floating `(Utxo, usize)` tuples
- `CoinSelectionResult` now has methods on it for distinguishing between
local amount included vs total.
CHANGELOG.md
src/types.rs
src/wallet/coin_selection.rs
src/wallet/mod.rs
src/wallet/tx_builder.rs