Skip to content

fix: require private Paykit auth scope - #653

Draft
ben-kaufman wants to merge 3 commits into
codex/paykit-incoming-payment-requestsfrom
codex/paykit-local-auth-testnet
Draft

fix: require private Paykit auth scope#653
ben-kaufman wants to merge 3 commits into
codex/paykit-incoming-payment-requestsfrom
codex/paykit-local-auth-testnet

Conversation

@ben-kaufman

@ben-kaufman ben-kaufman commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

  • require Paykit Server watch-only authorization requests to include both the public and private server capabilities
  • compare capability sets independently of ordering
  • expose the existing local E2E Homegate URL setting through Info.plist
  • update to Paykit 0.1.0-rc41 and select its local Pubky testnet client for local E2E builds
  • use the same Pubky client configuration for session bootstrap and the Paykit SDK
  • keep production network defaults unchanged

Validation: Paykit 0.1.0-rc41 resolved from its published tag, 33 focused tests passed, SwiftFormat passed, Info.plist lint passed, and the PR diff passed whitespace checks.

Linked Issues/Tasks

Screenshot / Video

N/A — no user-facing UI changes.

@ben-kaufman
ben-kaufman marked this pull request as ready for review August 4, 2026 18:48
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown

Greptile Summary

The PR tightens watch-only Paykit authorization to require both public and private capabilities, compares those capabilities without ordering sensitivity, and upgrades Paykit to rc41. It also shares a local-testnet Pubky client configuration between session bootstrap and the SDK, but the new Homegate plist placeholder prevents the intended localhost fallback when no override is defined.

  • Requires both Paykit server capability scopes for watch-only authorization.
  • Uses order-independent capability matching.
  • Configures bootstrap and SDK clients consistently for local E2E.
  • Exposes the Homegate URL through Info.plist and upgrades Paykit to 0.1.0-rc41.

Confidence Score: 4/5

The local E2E Homegate configuration failure should be fixed before merging because profile identity creation otherwise uses an invalid endpoint when no override is defined.

The authorization and Pubky-client changes are internally consistent, but the new nonempty Info.plist placeholder overrides the existing localhost default despite having no repository build-setting definition.

Files Needing Attention: Bitkit/Info.plist, Bitkit/Constants/Env.swift

Important Files Changed

Filename Overview
Bitkit/Models/PubkyAuthRequest.swift Requires the public and private watch-only capabilities and accepts either ordering through strict set equality.
Bitkit/Services/PubkyService.swift Supplies one shared Pubky client configuration to both session bootstrap and Paykit SDK initialization.
Bitkit/Constants/Env.swift Exposes local-E2E detection and retains the Homegate localhost fallback, which the newly inserted unresolved plist value can bypass.
Bitkit/Info.plist Adds an E2E_HOMEGATE_URL build-setting placeholder without defining the setting, breaking local E2E fallback behavior.
Bitkit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Resolves Paykit 0.1.0-rc41 at the corresponding pinned revision.
BitkitTests/PubkyAuthRequestTests.swift Covers reordered capabilities and rejection of watch-only requests missing the private capability.
BitkitTests/PaykitSdkClientConfigTests.swift Verifies production defaults and local-E2E testnet selection.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Local E2E profile creation] --> B[Read E2E_HOMEGATE_URL from Info.plist]
    B --> C{Build setting defined?}
    C -- No --> D[Literal placeholder is nonempty]
    D --> E[Localhost fallback is skipped]
    E --> F[Invalid Homegate signup endpoint]
    F --> G[Identity creation fails]
    C -- Yes --> H[Use configured Homegate URL]
Loading

Reviews (1): Last reviewed commit: "feat: use Paykit local testnet in E2E bu..." | Re-trigger Greptile

Comment thread Bitkit/Info.plist
@ben-kaufman
ben-kaufman requested review from jvsena42 and ovitrif August 4, 2026 19:15
@ben-kaufman
ben-kaufman marked this pull request as draft August 4, 2026 19:21
@ovitrif
ovitrif deleted the branch codex/paykit-incoming-payment-requests August 4, 2026 20:20
@ovitrif ovitrif closed this Aug 4, 2026
@ovitrif ovitrif reopened this Aug 4, 2026
@ovitrif
ovitrif changed the base branch from codex/batch-paykit-contact-cleanup to codex/paykit-incoming-payment-requests August 4, 2026 22:14
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.

2 participants