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 add_foreign_utxo for TxBuilder #329

Open
BitcoinZavior opened this issue Mar 24, 2023 · 4 comments
Open

Expose add_foreign_utxo for TxBuilder #329

BitcoinZavior opened this issue Mar 24, 2023 · 4 comments
Assignees

Comments

@BitcoinZavior
Copy link

BitcoinZavior commented Mar 24, 2023

At the moment TxBuilder does not have add_foreign_utxo

https://bitcoindevkit.org/docs-rs/bdk/nightly/latest/bdk/wallet/tx_builder/struct.TxBuilder.html#method.add_foreign_utxo

It will be great to have this method exposed so that it can be used in the language and framework bindings.

There is interest from the community in using this method in apps.

Ref:
LtbLightning/bdk-flutter#63

@notmandatory notmandatory added this to the Release 0.29.0 milestone May 25, 2023
@notmandatory
Copy link
Member

@thunderbiscuit can you put this on the agenda for Tues call? Let's see if we can get it into the next release.

@notmandatory
Copy link
Member

notmandatory commented May 31, 2023

Looks like there are a few other changes needed before we can enable this function. Per @BitcoinZavior's example in LtbLightning/bdk-flutter#63 other structs and functions we're missing in bdk-ffi are:

  1. psbt::Input, shouldn't need to expose internals
  2. psbt::PsbtSighashType, only add to UDL?
  3. Wallet::get_psbt_input
  4. Descriptor::max_satisfaction_weight

Should we divide and conquer and do in multiple PRs or all in one?

@BitcoinZavior
Copy link
Author

This comparison shows the Rust file changes: https://github.com/LtbLightning/bdk-flutter/compare/main...foreign-utxo?expand=1

This branch was made as an example for someone to use.

@notmandatory
Copy link
Member

notmandatory commented Jun 1, 2023

I went ahead and created #362 to add the Input, PsbtSighashType structs and the Wallet::get_psbt_input function. Once those are in it should be easier to finish up this PR.

EDIT: forgot about the Descriptor::max_satisfaction_weightfunction, I'll add that too.

@thunderbiscuit thunderbiscuit removed this from the Release 0.29.0 milestone Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants