Uh oh!
There was an error while loading. Please reload this page.
wip(payjoin-send): failing to sign the original PSBT - #191
Conversation
DanGould
commented
May 27, 2025
I love seeing this advance! Error HandlingMuch like how rust-bitcoin does not have a single generic error type because there are multiple errors to handle differently, rust-bitcoin does not have a generic error type. There are many errors that may need different handling. Some are recoverable and won't need to be printed. Some might be terminal. Our next update will make this easier, but for now, the payjoin-cli reference implementation is even incomplete with regard to error handling. If you want to create an single enum with variants for each of the payjoin error types, that could work. I'm not sure what BDK-CLI's error handling strategy is. I'd want to tap another BDK-CLI contributor to figure out what the preference for error handling for this project is. Receiver SigningIn order to sign, I think you'll need to re-introduce the UTXO data to the PSBT so BDK can figure out what keys go to each input since that data was stripped by the receiver. You can see that I faced a similar issue, and how I resolved it using BDK 1.0 alpha in Mutiny way back. I did the same with BitMask. This is a limitation of BDK. |
coveralls
commented
May 28, 2025
Pull Request Test Coverage Report for Build 15279732847Details
💛 - Coveralls |
mehmetefeumit
commented
Jun 4, 2025
Accidentally closed. Please see the finalized PR: #200 |
Description
This PR implements Payjoin sending functionality to the BDK CLI.
Draft Explanation
At the time of writing, this is a draft PR for implementing SendPayjoin to the BDK CLI. It still needs session persistence to be implemented, but I've been focused on the Payjoin receiver and sender commands so that I will work on later.
I also have a ReceivePayjoin branch on my local, but I am currently stuck at signing for both Sender and Receiver, so I am using this draft PR to get help regarding signing.
Regarding the current version of the PR, I need help with signing the original PSBT.
Notes to the reviewers
A couple of things I'd need more recommendation on:
?throughout the code.payjoin-cli receiveand use that in the sending logic I've implemented here, the receiver returns the following. This does not have any witness data at all, and thefinalizeddoes return false. I currently cannot understand why it cannot sign the UTXOs owned by this wallet though...:Changelog notice
I'm leaving the checklist to later since this is a draft PR for the purpose of asking for assistance.
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.mdBugfixes: