Payjoin#2049
Draft
thesimplekid wants to merge 8 commits into
Draft
Conversation
Introduce NUT-30 and NUT-31 quote metadata for payjoin endpoints and thread the fields through mint, wallet, payment trait, and FFI quote types. Expose BDK payjoin endpoint configuration in mintd and regtest wiring so onchain mints can advertise receiver support. Document the onchain payjoin extension and cover quote-id propagation for mint and melt quotes.
Move BDK payjoin sender and receiver logic into dedicated session handling with background pollers that can resume in-flight work. Persist payjoin quote metadata and session state across wallet backends, including SQL and Supabase migrations plus wallet database coverage. Add CLI mint and melt payjoin flags, shared parsing helpers, fee and output validation, receive-session pruning, and regtest coverage for persisted flows.
Stop carrying deserialize support for outgoing websocket notifications and keep notification payload handling on the serialized event path. Update Cashu and CDK pub-sub event types, including the NUT-30 payjoin notification payload, to match the reduced decoding surface.
Add chain backend support for checking whether a transaction was broadcast so payjoin recovery can distinguish unpublished and published sessions. Persist and check broadcast state during payjoin handling, and add NUT-17 notification coverage for the broadcast status event.
Replace raw payjoin quote key strings with typed NUT-31 quote key structures across Cashu, CDK common, BDK, CLI, FFI, and docs. Tighten quote-id tests and wallet saga plumbing so payjoin metadata is parsed and passed through consistently.
Add receive-side payjoin session records and hook them into BDK recovery so pending receiver state can be reconstructed after restart. Persist receive session identifiers alongside payment intents and route resumed receive work through the payjoin session module. Update integration test helpers for payjoin receive flows.
Persist sender payjoin request and response state with storage APIs and chain-backend hooks so interrupted send sessions can resume. Rehydrate pending sender intents through recovery and send service startup, including broadcast tracking and stored payment intent metadata.
Wire startup checks, receive storage, and payment trait support for payjoin recovery so outstanding sessions are resumed when services come up. Consolidate Payjoin send recovery onto PayjoinNegotiating send intents instead of maintaining a duplicate send-session store. Extend onchain regtest coverage for startup recovery and persisted receive flows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just quick-checkbefore committingcrates/cdk-ffi)