Skip to content
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

Explore integration of Payjoin/PDK #177

Open
moneyball opened this issue Oct 28, 2023 · 6 comments
Open

Explore integration of Payjoin/PDK #177

moneyball opened this issue Oct 28, 2023 · 6 comments

Comments

@moneyball
Copy link

There is an opportunity to use Payjoin to make deposits into LDK Node use 1 txn instead of 2 when an on-chain txn funds a LN wallet/channel. Mutiny is doing this. We should explore it on LDK Node (probably medium priority behind LSP client, VSS, Electrum support).

@tnull
Copy link
Collaborator

tnull commented Oct 30, 2023

Yeah, I agree that, while not being an immediate priority, it would be a nice-to-have in the future. This would probably also depend on/go hand in hand with #178.

@DanGould
Copy link

DanGould commented Jan 15, 2024

Payjoin V2 in PDK eliminates the need for tor #178

@tnull
Copy link
Collaborator

tnull commented Jan 16, 2024

Payjoin V2 in by PDK eliminates the need for tor #178

That's good to know! Is my impression correct that v2 is still work-in-progress in PDK? Or is it already useable?

@DanGould
Copy link

It's been released as a usable alpha with feature flag v2

@tnull
Copy link
Collaborator

tnull commented Jan 17, 2024

It's been released as a usable alpha with feature flag v2

Great! Do you mind pointing me to some code that roughly shows how v2 integration looks like? I think I got confused before as the only reference to v2 I could find in the docs are the module-level docs here, which don't seem to indicate that it's ready/how it could be used: https://docs.rs/payjoin/latest/payjoin/v2/index.html

@DanGould
Copy link

DanGould commented Jan 18, 2024

v1 an v2 are backwards compatible so you should be able to use the instructions in send and receive modules. Receive has it's own v2 module Follow the payjoin-cli reference implementation's v2 feature codepath. The evolving mutiny-node implementation is another reference.

Once you construct send's RequestContext from the builder you can poll the directory by repeatedly calling extract_v2

The top level v2 module ought to be private in the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants