Skip to content

Commit a70f638

Browse files
committed
psbt,params: Add remove_utxo
1 parent 28a88b0 commit a70f638

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

wallet/src/psbt/params.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ impl PsbtParams {
5858
self
5959
}
6060

61+
/// Remove a UTXO from the currently selected inputs.
62+
pub fn remove_utxo(&mut self, outpoint: OutPoint) -> &mut Self {
63+
self.utxos.remove(&outpoint);
64+
self
65+
}
66+
67+
/// Get the current input selection.
68+
pub fn utxos(&mut self) -> &HashSet<OutPoint> {
69+
&self.utxos
70+
}
71+
6172
/// Add the spend [`Assets`].
6273
///
6374
/// Assets are required to create a spending plan for an output controlled by the wallet's

0 commit comments

Comments
 (0)