feat: support incoming paykit requests#637
Open
ben-kaufman wants to merge 2 commits into
Open
Conversation
4 tasks
Greptile SummaryThis PR adds support for receiving and paying incoming Paykit requests. The main changes are:
Confidence Score: 4/5The backup migration and payment submission paths need fixes before merging.
PrivatePaykitService+Backup.swift, LnurlPayConfirm.swift, and SendConfirmationView.swift
|
| Filename | Overview |
|---|---|
| Bitkit/Services/PaykitPaymentRequestService.swift | Adds request parsing, synchronization, expiration handling, presentation deduplication, and acceptance state. |
| Bitkit/Services/PrivatePaykitService+Payments.swift | Adds private request resolution, public fallback rules, and consumed-version enforcement. |
| Bitkit/Services/PrivatePaykitService+Backup.swift | Wraps Paykit backup state in a new JSON shape without restoring the previous raw-string format. |
| Bitkit/Views/Wallets/Send/LnurlPayConfirm.swift | Accepts and consumes incoming requests before the LNURL invoice is fetched. |
| Bitkit/Views/Wallets/Send/SendConfirmationView.swift | Integrates request acceptance and consumption but can submit an embedded invoice amount that differs from the requested amount. |
| Bitkit/AppScene.swift | Adds active-scene polling and serialized request presentation through the send sheet. |
| Bitkit/Services/PubkyService.swift | Adapts the Paykit integration to separate public and private rc39 APIs and advertises request support. |
Sequence Diagram
sequenceDiagram
participant Peer as Paykit Peer
participant Manager as Request Manager
participant Resolver as Private Resolver
participant UI as Send Confirmation
participant Wallet
Peer->>Manager: Proposed payment request
Manager->>Resolver: Resolve endpoint for requested amount
Resolver-->>UI: Payment target and list version
UI->>Manager: Accept request
UI->>Resolver: Persist consumed version
UI->>Wallet: Fetch invoice and submit payment
Note over UI,Wallet: LNURL fetch currently happens after acceptance and consumption
Reviews (1): Last reviewed commit: "feat: support incoming paykit requests" | Re-trigger Greptile
ben-kaufman
force-pushed
the
codex/paykit-watch-only-accounts
branch
2 times, most recently
from
July 22, 2026 11:39
990db23 to
e4a5c92
Compare
ben-kaufman
force-pushed
the
codex/paykit-incoming-payment-requests
branch
2 times, most recently
from
July 22, 2026 14:09
ae345b3 to
778f6d0
Compare
ben-kaufman
force-pushed
the
codex/paykit-incoming-payment-requests
branch
from
July 22, 2026 15:34
778f6d0 to
9dcc431
Compare
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
This PR builds on #630 to support incoming Paykit payment requests:
0.1.0-rc39and uses its separate public and private payment resolution APIs.Payment proofs and receipts remain out of scope.
Linked Issues/Tasks
Screenshot / Video
N/A — the existing payment UI is reused, and no media is attached.
QA Notes
Manual Tests
Automated Checks
PaykitPaymentRequestServiceTests.swift: request mapping, expiry, lifecycle, acceptance, and refresh concurrency.PrivatePaykitServiceTests.swift: consumed-list persistence and prevention of private payment-detail reuse.PublicPaykitServiceTests.swift: separate public payment endpoint parsing and resolution.git diff --checkpassed.