rust-payjoin icon indicating copy to clipboard operation
rust-payjoin copied to clipboard

sender: allow for multiple payouts

Open arminsabouri opened this issue 1 year ago • 3 comments

original TODO comment: https://github.com/payjoin/rust-payjoin/blob/6e512ff745078760dcdf309e224c5c9c44336363/payjoin/src/send/mod.rs#L105

Allow a sender to be created that pays out to multiple destination addresses. We should replace check_single_payee with check_for_all_payouts and unit test it

arminsabouri avatar Dec 11 '24 02:12 arminsabouri

This kind of multiparty API change needs to be experimented with before payjoin-1.0 so we know that our stable API can accommodate it. It would be crappy to stabilize the API and realize multiparty required a complete re-implementation with a different API.

DanGould avatar Jan 03 '25 20:01 DanGould

Agreed. This is tangentially related to https://github.com/payjoin/rust-payjoin/pull/434 however it really could be its own effort as well. The interface question is really how do we communicate more than one payee address in a BIP-21. IIRC the spec doesnt account for more than one payee so we could utilize some custom query params but then support and intergration becomes a burden. BIP-321 is a BIP to revisit BIP-21 this could be an interesting place to advocate for multi payee support.

arminsabouri avatar Jan 05 '25 19:01 arminsabouri

It wouldn't kill us if this were saved for a later release than 1.0

DanGould avatar Aug 26 '25 14:08 DanGould