-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support Bustapay (bip79) #4766
Comments
How is the partially signed txn serialised? Is it a PSBT? If so, that's not implemented yet (#4615). |
@SomberNight No, it doesn't use PSBT. I originally built a version with PSBT, but it was just overly complex and really provided no benefits. What the client sends the bustapay server is a normal (fully signed) segwit transaction (i.e. the exact same thing you'd normally push on the network). So that part is easy. Then the server response with a raw partial transaction, an example would be:
The unsigned inputs are the same from the original transaction, just this time need to be resigned. So the client resigns it, and then pushes it on the network. The client already has enough information to resign, on account of it having done it in the first place. There's really not much to it, except the "validation" where you make sure the partially-signed transaction the server sends you is non-malicious (you can see what the validation looks like, checking the partial transaction against the original). But even that is a fair bit easier than you'd imagine, as you don't need to validate the servers inputs (if they're invalid, the transaction will just not propagate). You really just need to make sure: a) the outputs are the same (except the amounts may increase) and b) all your original inputs are there, and you are only (re)signing those original inputs. |
Ok. In that case I don't see any major hurdles. |
Note: we can do the receiver side too, since a http server is integrated to the client. |
closing in favour of #6585 |
It would be great if electrum could support sending bustapay payments.
Here's the spec: https://github.com/bitcoin/bips/blob/master/bip-0079.mediawiki
It's actually a pretty straight forward protocol, that's a bit easier to develop than it looks -- and offers pretty powerful privacy improvements.
I have somewhat of a reference implementation here, which is pretty easy to follow along:
https://github.com/RHavar/bustapay/blob/master/send/send.go#L16
And to save anyone the trouble of setting up a bustapay receive server, I have one already running on testnet: http://test.bustapay.com
e.g. with the reference client you can go:
which would make a 0.01 BTC bustapayment to a (new) address on that server.
The text was updated successfully, but these errors were encountered: