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

Tx Builder metadata #1759

Open
buffrr opened this issue Dec 5, 2024 · 0 comments
Open

Tx Builder metadata #1759

buffrr opened this issue Dec 5, 2024 · 0 comments
Labels
module-wallet new feature New feature or request

Comments

@buffrr
Copy link

buffrr commented Dec 5, 2024

Describe the enhancement

The Tx Builder is uniquely positioned to know all the details about a transaction being made with it. Foreign utxos, any special ordering requested, any explicitly specified locktime and possibly even the coin selection algorithm specified.

It would be valuable for the builder to generate metadata that can be optionally applied to the wallet something like wallet.apply_tx_with_metadata, allowing it to track foreign UTXOs, preserve transaction details, and even include comments or notes.

Use case

As a consumer of bdk, it's unintuitive that:

  1. I would need to manually insert any foreign utxos already added to the builder using insert_txout otherwise I wouldn't be able to calculate/bump the fee for that transaction.
  2. Wallet assumes double spends of those foreign utxos are not relevant during sync leaving them stuck as unconfirmed.
  3. Transaction properties (ordering, explicitly specified locktime, coin selection) are not preserved during fee bumping

Also storing comments or additional metadata directly in the wallet database improves usability by eliminating the need to track them separately.

@notmandatory notmandatory added this to BDK Dec 6, 2024
@notmandatory notmandatory moved this to Discussion in BDK Dec 6, 2024
@notmandatory notmandatory added new feature New feature or request module-wallet labels Dec 6, 2024
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: Discussion
Development

No branches or pull requests

2 participants