Repository navigation
Conversation
A spending-only wallet pays a Paykit contact whose only endpoint is on-chain through a Pubky Swaps provider found among its contacts. Behind PUBKY_SWAPS_ROUTES on regtest debug builds. Uses bitkit-core 0.8.0-swaps.2.
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.
Twin: synonymdev/bitkit-android#1732
Dependency: synonymdev/bitkit-core#182
Refs:
This PR routes a Paykit contact payment through a Pubky Swaps provider when the contact only accepts on-chain bitcoin and the wallet holds only a spending balance.
Description
PUBKY_SWAPS_PROVIDERSadds extra candidates for testing.Route: Pubky Swaps · <provider>, with the whole swap cost in the fee row.PUBKY_SWAPS_ROUTES(environment or launch argument) on regtest debug builds only.paykit-swap-route.xmljourney from Android.Builds against the bitkit-core prerelease
0.8.0-swaps.2, cut from synonymdev/bitkit-core#182, which also links Network.framework for the swap transport; move to a regular release once that merges.Why this journey
What it needs to ship
swap/1in Paykit: negotiation over Paykit Encrypted Links (paykit-cap.*) instead of iroh, which needs the additive paykit-rs SDK API for extension kinds (Design review: Paykit Capabilities, a general capability and intent layer for Paykit peers (answers Paykit Intents question 8) pubky/paykit-rs#229, §17), and signed quotes and contracts from pubky-swap.Out of Scope
Design
N/A — no design available.
Preview
A wallet with only a spending balance pays a contact who accepts only on-chain bitcoin. The router finds a Pubky Swaps provider among the wallet's contacts, the confirm screen shows the route, and the contact receives exactly 20,000 sats on chain (2x speed, regtest).
swaps-route-ios2x.mp4
QA Notes
Setup
mainwith the marketplace, payment-requests and lnurl-pay profiles; coreyphillips/pubky-swap at8686702with its one local change; bitkit-docker'sfixture-issueras the contact).xcodebuild build -project Bitkit.xcodeproj -scheme Bitkit -configuration Debug -destination 'platform=iOS Simulator,name=<simulator>' 'SWIFT_ACTIVE_COMPILATION_CONDITIONS=$(inherited) E2E_BUILD' E2E_BACKEND=local E2E_NETWORK=regtest E2E_HOMESERVER_PUBKY=$(./pubky-marketplace info | jq -r .homeserver_z32), installed on a simulator on the same Mac as bitkit-docker and launched withxcrun simctl launch <udid> to.bitkit -PUBKY_SWAPS_ROUTES=true. The simulator reaches the host loopback directly.curl -H 'Host: 127.0.0.1:23010' 127.0.0.1:23010/generate/channel(500,000 sats to spending, opened withxcrun simctl openurl <udid> lightning:<lnurl>); leave savings empty; create a Pubky profile; save the provider's and the fixture-issuer's pubkys as contacts (bitkit://contact?pubky=<pubky>)../pubky-marketplacerestarts the testnet container, restarthomeserver-proxy,paykit-server,fixture-issuerandrc56-peertoo: they share its network namespace, and profile creation fails with "complete Pubky auth flow" otherwise.Journeys
paykit-swap-route.xml— a spending-only wallet pays an on-chain-only contact through a Pubky Swaps provider found among its contacts, and the contact receives exactly 20,000 satsManual Tests
N/A
Automated Checks
N/A
Evidence
0.8.0-swaps.2and noPUBKY_SWAPS_PROVIDERS, so the provider came only from the wallet's contacts (the recording above). The build was7315045before its formatting-only change to the new service file:Route: Pubky Swaps · 5no8...pquoand a fee of ₿ 986 for 20,000 sats;HTLC funded; awaiting client claimand, after one block,client claimed; hold invoice settled;quote_expired, and nothing was paid.unit-tests.ymlpassed at7315045; SwiftFormat lint is clean on the changed files apart from findings already onmaster, andvalidate-translations.jspasses.Gaps
Models used
claude-opus-5-5(reasoning:medium)claude-opus-5-5(reasoning:medium)