Open
Description
A Payjoin integration with ldk-node
started here lightningdevkit/ldk-node#257 and there are a couple of things I discussed with tnull and we thought it would be good to bring the discussion up to here to see what everyone thinks.
Our goal of integrating Payjoin with lightning is to allow users to create a channel with funds that live outside the node wallet.
In order to achieve the above goal, we need to implement the following functionality:
- Allow a lightning node to act as a Payjoin receiver (you can look at the top of this file to understand what does it mean to be Payjoin receiver https://github.com/payjoin/rust-payjoin/blob/master/payjoin/src/receive/mod.rs#L1)
- Allow a lightning node runner to schedule a channel for future opening (ie channel scheduler)
- Negotiate channel opening with a peer based on the incoming Payjoin request and respond to the Payjoin sender after the negotiating reached the
Funding Signed
phase.
You can find a detailed diagram of the desired flow here lightningdevkit/ldk-node#257 (comment)
Two questions were raised in offline discussions:
- Which of the parts should live in ldk-node/ldk/payjoin/separate crate. This question is raised because while we doing this in LDK-node, maybe we could also enable other node implementations who uses ldk to leverage Payjoin.
- We need to get a hold on the PSBT after the
FundingSigned
msg exchange and and send it back to the Payjoin sender, ie we dont wanna broadcast it ourselves even tho its an outbound channel. The question is how we want to allow that or is it possible already?
cc @DanGould
Metadata
Metadata
Assignees
Labels
No labels