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.
This PR adds the data layer using PDK with session persistence, continuous fetching of the payjoin directory in a separate isolate and automatic resume at startup. The data layer streams events when a payjoin request or proposal is received and the higher layers (payjoin repository and payjoin service) are implemented to listen and process these events. The payjoin service uses other services and repositories like the Wallet service, Electrum Server repository and others to verify, sign and broadcast the payjoins. The payjoin service exposes a stream the rest of the application can listen to to receive updates of payjoin sessions while they get processed.
Also the use cases to create a payjoin, send a payjoin and listen for updates of a specific payjoin were added.
This should complete the full refactor of payjoin for now. Only thing left to do now is write integration tests for an end-2-end receive and send payjoin.