mutiny-node icon indicating copy to clipboard operation
mutiny-node copied to clipboard

Payjoin Support

Open benthecarman opened this issue 2 years ago • 6 comments

https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki

benthecarman avatar Dec 11 '22 17:12 benthecarman

Need rust-bitcoin to support it or to use some of the rust payjoin libraries still being developed on.

TonyGiorgio avatar May 10 '23 18:05 TonyGiorgio

Adding the ability to send payjoin from bdk using rust-payjoin was ~a 200 line change including test for BitMask. Receiving payjoin can be done securely using a relay.

A second reference BDK x Payjoin implementation will be completed for BDK-CLI as part of the summer of bitcoin.

Where does this fall on the roadmap? It does not seem blocked by library support as implied by the tag. I'm happy to elaborate as appropriate.

DanGould avatar May 20 '23 20:05 DanGould

Adding the ability to send payjoin from bdk using rust-payjoin was ~a 200 line change including test for BitMask. Receiving payjoin can be done securely using a relay.

A second reference BDK x Payjoin implementation will be completed for BDK-CLI as part of the summer of bitcoin.

Where does this fall on the roadmap? It does not seem blocked by library support as implied by the tag. I'm happy to elaborate as appropriate.

Very cool. When I was looking through issues on rust-bitcoin/bdk I was only seeing old things so I didn't see any support. I also wasn't sure how it was coming along with the payjoin libraries. I had only seen this one: https://github.com/Kixunil/payjoin which looked pretty out of date.

Glad to have a pointer to yours, I think that would be really great to add. I think the only thing I see as a problem is that we use no-std rust-bitcoin and need default-features = false in any bitcoin library that we import due to wasm restrictions. If that's not a problem to add then I think it would be great to put into Mutiny.

TonyGiorgio avatar May 21 '23 18:05 TonyGiorgio

I think that would be really great to add. I think the only thing I see as a problem is that we use no-std rust-bitcoin and need default-features = false in any bitcoin library that we import due to wasm restrictions.

Only the receive feature depends on the std via rand crate, not send. I think it could be replaced by rand_core to support wasm, or perhaps use the no-std rand feature in bitcoin. Should be able to add a no-std feature flag to use no-std bitcoin. Do you foresee any other caveat @TonyGiorgio?

DanGould avatar May 21 '23 21:05 DanGould

I think that would be really great to add. I think the only thing I see as a problem is that we use no-std rust-bitcoin and need default-features = false in any bitcoin library that we import due to wasm restrictions.

Only the receive feature depends on the std via rand crate, not send. I think it could be replaced by rand_core to support wasm, or perhaps use the no-std rand feature in bitcoin. Should be able to add a no-std feature flag to use no-std bitcoin. Do you foresee any other caveat @TonyGiorgio?

Yeah I think that should work, I looked at the other dependencies and those seemed pretty straightforward so there shouldn't be any other problems. Would be able to find out fast by importing it after it gets no-std.

TonyGiorgio avatar May 22 '23 03:05 TonyGiorgio

No longer blocked, 0.8.1 of payjoin is now compiling. Thanks @DanGould !

TonyGiorgio avatar May 31 '23 16:05 TonyGiorgio