Skip to content

Conversation

@BitcoinErrorLog
Copy link
Contributor

Overview

This PR implements critical production-ready features for Paykit:

1. Background Noise Server via Push Notifications

  • Enables incoming payment requests when app is closed/backgrounded
  • Uses APNs silent push notifications to wake the app
  • Starts Noise server in background task to accept connections
  • Stores received payment requests for later review

2. Invoice Number Abstraction

  • Adds invoiceNumber field to payment requests and receipts
  • Allows cross-referencing between requests and receipts
  • Supports payments via any method (Lightning, on-chain, etc.)

3. Receipt-Request Association

  • Links receipts to original payment requests via invoice number
  • Tracks fulfillment status of requests

Key Changes

Services

  • NoiseBackgroundService.swift - Background Noise server lifecycle
  • PushNotificationService.swift - Wake notification sending
  • DirectoryService.swift - Push endpoint publishing

Models

  • Added invoiceNumber, receiptId to BitkitPaymentRequest
  • Added requestId, invoiceNumber to PaymentReceipt

Storage

  • Cross-reference methods for invoice number lookups

UI

  • Display invoice numbers and receipt links

Testing

  • No linting errors
  • Ready for E2E testing

JOHN added 2 commits December 18, 2025 05:35
…ns and invoice number linking

- Add push notification handler for incoming Noise requests
- Implement background Noise server in NoisePaymentService
- Create NoiseBackgroundService for background task management
- Add PushNotificationService for sending wake notifications to peers
- Add invoiceNumber and receiptId fields to PaymentRequest model
- Add requestId and invoiceNumber to PaymentReceipt model
- Add cross-reference methods to PaymentRequestStorage (getRequestByInvoiceNumber, fulfillRequest)
- Add push notification endpoint publishing to DirectoryService
- Register background task identifier in Info.plist
- Update PaymentRequestsView UI to display invoice numbers and linked receipts
- Add invoice number field to CreatePaymentRequestView
@BitcoinErrorLog BitcoinErrorLog merged commit aae3914 into synonymdev:paykit-integration-complete Dec 19, 2025
1 of 4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant