Repository navigation
Conversation
This was referenced Nov 2, 2026
# Conflicts: # src/modules/pubky_swaps/client.rs
Collaborator
Author
|
Pushed
|
# Conflicts: # src/modules/pubky_swaps/router.rs
# Conflicts: # bindings/ios/bitkitcore.swift # src/lib.rs
# Conflicts: # src/modules/pubky_swaps/client.rs
# Conflicts: # bindings/ios/bitkitcore.swift
Collaborator
Author
|
Removed Arkade from this PR for now, so service routes are Spark-only: the Arkade PRs are closed and Bitkit uses Spark for Lightning. The router itself never named a service, so 32c5735 only changes the docs, the binding comments and the tests that used an Arkade leg. |
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.
Dependency: #182
Refs:
This PR lets services the wallet holds a balance on, such as Spark, compete with Pubky Swaps providers as legs in the Paykit router.
Description
service_legstoPaykitRouteRequest: routes through a service the wallet holds a balance on, each already quoted by the app's engine for that service. A Spark withdrawal (feat: add spark via breez sdk bitkit-android#1697, feat: add spark via breez sdk bitkit-ios#1128) can pay an on-chain-only contact from Spending without a Pubky Swaps provider.PaykitRoute::Service { leg }, which the app runs with that service's own send.atomicity:trustedfor Spark.Lightning through Spark needs no service leg: the apps count that balance as Lightning-spendable, and
Directcovers it. One route still has one leg: a service paying a provider's hold invoice is not routed here.Cut as the prerelease
0.8.0-swaps.3. synonymdev/bitkit-android#1732 and synonymdev/bitkit-ios#1170 build on it with no legs; synonymdev/bitkit-android#1754 and synonymdev/bitkit-ios#1191 pass Spark legs.Cross-platform impact
PaykitRouteRequestgains a required field, andPaykitRoutegains a variant. feat: pay contacts via pubky swaps bitkit-android#1732 and feat: pay contacts via pubky swaps bitkit-ios#1170 need to passservice_legs(empty until an adapter fills it) and handleServicewhen they move to a release with this PR.What it needs to ship
Preview
N/A — router logic only; covered by unit tests.
QA Notes
Setup
N/A — no device testing required: the change is covered by unit tests, and no app passes service legs yet.
Automated Checks
router.rsunit tests: the cheapest service leg to a published endpoint, dropping expired legs and legs that deliver another amount, and the fee comparison with the swap winning a tieclient.rsunit tests: a service route without providers, and the reason when neither existscargo fmt --check,cargo clippy --lib --tests(no findings inpubky_swaps) andcargo test --lib pubky_swaps: passservice_legsModels used
claude-opus-5-5(reasoning:medium)claude-opus-5-5(reasoning:medium)