krux icon indicating copy to clipboard operation
krux copied to clipboard

[Enhancement] Payjoin v2 support

Open Sami32 opened this issue 2 months ago • 4 comments

Describe your request

For being able to sign payjoins transactions. https://payjoin.org/docs/how-it-works/payjoin-v2-bip-77/ https://github.com/payjoin

https://en.bitcoin.it/wiki/PayJoin_adoption https://github.com/orgs/payjoin/projects/1/views/7

Edit: https://github.com/payjoin/rust-payjoin/blob/master/payjoin-ffi/python/test/test_payjoin_integration_test.py

Sami32 avatar Oct 08 '25 21:10 Sami32

I thougt in this for a time, like a "airgapped payjoin" without a coordinator (mixing inputs between two parts). But the protocol states that is necessary a coordinator. Besides that, is necessary to support PSBTv2 first.

qlrd avatar Oct 08 '25 21:10 qlrd

BIP 77 Async Payjoin (v2) uses PSBTv0 (BIP 174) not PSBTv2 (BIP340) and is p2p coordinated. The sender and receiver rendezvous at a blind directory server that hosts mailboxes, but it's not really a "coordinator" since it only sees a uniform 8kb blob. The point of the mailbox is just so that sender and receiver don't have to host a server and can come and go offline as they please (hence "async").

That said, I think as long as krux lets PSBTv0 input signing work when there are foreign inputs, it shouldn't need to do much more to support payjoin. If you want to get fancy, there are UI concerns seedsigner has begun to explore

I don't know everything about krux but I search the "payjoin" keyword regularly and this came up, and I at least wanted to let you know you don't need PSBTv2 to support payjoin.

DanGould avatar Oct 12 '25 03:10 DanGould

A PayJoin transaction can mix different address or script types (legacy, nested SegWit, native SegWit, Taproot), right? Just for record, I think we restrict this on inputs.

tadeubas avatar Oct 12 '25 12:10 tadeubas

Payjoin spec doesn't restrict mixed script types but clients can, correct. It's just concerned with coordination between 2 parties, clients care about tx construction.

DanGould avatar Oct 12 '25 14:10 DanGould