-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Description
TxBuilder::add_foreign_utxo allows the construction of transactions with UTXOs not belonging to the wallet.
Trying to RBF those transactions up to #337 failed.
#337 is relying on the manual addition of the UTXOs to the transaction graph.
The wallet is not going to list them them as LocalUtxos because the KeychainTxOutIndex filters out any outpoint not related to a script pubkey produced by the KeyChain.
Something that may be needed though in Wallet is a method to insert transactions, as the only available now is insert_txout but for non segwit foreign UTXOs the full transaction will be needed at the moment of building the tx RBF.
To address the original issue from the perspective of TxBuilder, I had three options so far:
- Calling
Wallet.insert_txoutfromTxBuilder.add_foreign_utxoto make this less manual, but I think is going to make the API much more entangled to what I would like. - Document the workflow rather than embedding the logic into
TxBuilder. - Add a method to list non local UTXOs to wallet or tx graph and error in
TxBuilder.add_foreign_utxoif the UTXO is not listed there, forcing the TxBuilder API user to callWallet.insert_transactionorWallet.insert_txoutbefore callingTxBuilder.add_foreign_utxo.
I think the third one is preferable, but I'm writing this issue to gather feedback and see if there are any concerns I"m overlooking.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status