Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose way to select only (n-)confirmed UTXOs for TX creation #1029

Open
Tracked by #68 ...
tnull opened this issue Jul 6, 2023 · 2 comments
Open
Tracked by #68 ...

Expose way to select only (n-)confirmed UTXOs for TX creation #1029

tnull opened this issue Jul 6, 2023 · 2 comments
Labels
module-wallet new feature New feature or request

Comments

@tnull
Copy link
Contributor

tnull commented Jul 6, 2023

Describe the enhancement
Add a way to create transactions with bdk::Wallet that only spend confirmed UTXOs.
This could easily be done by adding a corresponding must_only_use_confirmed_tx field to TxParams and ORing it into

if must_only_use_confirmed_tx && !confirmation_time.is_confirmed() {

However, TxParams is currently pending exposure:

//TODO: TxParams should eventually be exposed publicly.

Use case
This is needed to use BDK's coin selection for bumping transactions generated by LDK, in particular for https://docs.rs/lightning/0.0.116-alpha1/lightning/events/bump_transaction/trait.CoinSelectionSource.html#tymethod.select_confirmed_utxos

@danielabrozzoni
Copy link
Member

Concept ACK, I've added this one to #988 so that I don't forget about it.

You probably already know this, but as a workaround you could add all the unconfirmed utxos to the unspendable list :/

@tnull
Copy link
Contributor Author

tnull commented Jul 20, 2023

Concept ACK, I've added this one to #988 so that I don't forget about it.

Ah, thank you!

You probably already know this, but as a workaround you could add all the unconfirmed utxos to the unspendable list :/

Ah, yeah, it's a bit clunky but makes sense I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module-wallet new feature New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants