feat: add private payment requests - #676
Conversation
Greptile SummaryThis PR adds SDK-backed private payment-request creation, receipt, presentation, rejection, history, and identity-scoped suppression, alongside Paykit session-restoration and local E2E configuration changes.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code defect established by the reviewed request, identity, and presentation flows. The request lifecycle validates active identity and recipient eligibility, reconciles actions against authoritative SDK state, scopes presentation suppression by identity, and guards overlapping presentation and creation operations.
|
| Filename | Overview |
|---|---|
| Bitkit/Services/PaykitPaymentRequestService.swift | Adds incoming and outgoing request mapping, recipient eligibility, proposal/rejection operations, identity-scoped presentation persistence, retries, expiry, and action reconciliation. |
| Bitkit/AppScene.swift | Integrates identity activation, recipient refresh, automatic request presentation, and Send-sheet lifecycle reconciliation. |
| Bitkit/Services/PubkyService.swift | Adds payment-request SDK methods and deferred recovery from stale externally managed Pubky sessions. |
| Bitkit/ViewModels/SheetViewModel.swift | Adds payment-request sheet configuration and replacement-state coordination for delayed sheet transitions. |
| Bitkit/Views/PaymentRequests/CreatePaymentRequestView.swift | Implements amount, note, expiry, recipient selection, submission, and delivery-result UI. |
| Bitkit/Views/PaymentRequests/PaymentRequestsView.swift | Implements pending previews, full incoming and sent history, manual payment reopening, and rejection. |
| BitkitTests/PaykitPaymentRequestServiceTests.swift | Extensively covers mapping, delivery, eligibility, expiration, identity isolation, concurrency, retries, and reconciliation. |
Sequence Diagram
sequenceDiagram
participant Peer
participant SDK as Paykit SDK
participant Manager as PaymentRequestManager
participant UI as Bitkit UI
participant Send as Send Flow
Peer->>SDK: Private payment request
Manager->>SDK: Synchronize private messages
SDK-->>Manager: Actionable incoming requests
Manager-->>UI: Pending request notification
UI->>Manager: Open request
Manager->>SDK: Resolve private payment details
SDK-->>Manager: Private endpoint or retry state
Manager->>Send: Present exact amount and contact
Send->>Manager: Accept request
Manager->>SDK: Accept and queue response
Manager-->>UI: Remove request from pending history
Reviews (1): Last reviewed commit: "feat: add private payment requests" | Re-trigger Greptile
7ef6f37 to
1604cb7
Compare
ovitrif
left a comment
There was a problem hiding this comment.
Approved. Incoming private requests open in Send with the requesting contact and exact amount, dismissed requests stay reopenable until reject or expiry, and a consumed Private Payment List is never reused or replaced by public details.
ad1803b to
5756057
Compare
This PR adds private Paykit Payment Requests to Bitkit.
Description
0.1.0-rc44and adds local E2E homeserver configuration plus safe cold-start restoration for externally managed Pubky sessions.The request payload itself remains SDK-backed and durable; Bitkit persists only identity-scoped presentation suppression, not a duplicate request queue. Payment proofs and receipts remain out of scope.
Dependencies:
41cda2567226a690a012770017d5e7c1d49e2a2b.Linked Issues/Tasks
N/A
Screenshot / Video
N/A — proof recordings were completed locally and are intentionally not attached to the PR.
QA Notes
Manual Tests
Automated Checks
BitkitTests/PaykitPaymentRequestServiceTests.swift: 46 tests cover mapping, eligibility, proposal delivery, rejection, expiry, identity isolation, presentation races, queue durability, fresh-list retry, and action reconciliation.BitkitTests/PaykitSdkClientConfigTests.swift: 4 tests cover production/local configuration and safe deferred session restoration.