ios: add native Wavelength wallet - #6
Draft
bhandras wants to merge 6 commits into
Draft
Conversation
Add typed network configuration for the Esplora-backed lightweight wallet, including explicit mainnet opt-in and local regtest transport handling. Expose richer activity metadata, parse Lightning and BIP-21 payment requests, and link the resolver dependency required by the embedded Go runtime.
Replace the minimal sample with an idiomatic SwiftUI wallet covering balance, activity and details, Lightning and on-chain send and receive, QR scanning, recovery, and network-isolated settings. Keep incomplete receives visibly pending, make mainnet an explicit choice, and add unit and opt-in live UI coverage for the core wallet flows.
Add Make targets that select and boot an iPhone Simulator, generate the Xcode project, and build, test, install, or launch the wallet from the command line. Document the native app, release framework setup, and environment-driven live regtest workflow without requiring endpoint variables for normal builds.
Re-dial the embedded wallet after a background transition, but wait for state-creating calls to return before teardown. Publish balance and activity independently so one slow source cannot suppress the other. Bound invoice creation through the native request and reconcile Activity before allowing a deliberate retry after an uncertain timeout.
Add a Make target that auto-selects a connected iOS device and relaunches the installed wallet under devicectl's attached console. This streams Swift and embedded daemon output directly to the terminal without requiring developers to copy the in-app diagnostic buffer. Document the workflow and forward the targets from ios/Sample.
The merged mobile binding marks request deadlines and lifecycle cancellation as uncertain because invoice creation may already be durable. The Swift wrapper only recognized generic timeout text, so a canceled receive could bypass Activity reconciliation and appear safe to retry. Recognize the binding's stable uncertainty prefix and route it through the same recover-before-retry path. Keep generic deadline matching for older bindings. Test the new prefix, legacy timeout, and negative case.
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.
Summary
activity, activity inspection, and Lightning/on-chain send and receive
requests
explicit mainnet warning and network selection available before unlock
Activity and payment behavior
shown after settlement
the activity stream
Mobile transport recovery
source cannot suppress a successful update from the other
signal for both deadline and lifecycle cancellation
creating a second invoice after an uncertain result
spinner
same embedded wallet to re-dial external transports on the current path
transport recovery cannot cancel a payment or receive at an ambiguous point
Wavelength dependency
wavelength#1131 is
merged as
da8903b633d0a45122eb2f5cbc72aeb307c52c98. Its source tree contains:Receivewith a stable uncertain-outcome error contract;v0.18.1-0.20260826052527-33c252f3b4d6, which releases the walletdatabase transaction before remote recovery filtering.
This PR was built and tested against an xcframework generated from that exact
merged source tree. The reviewed PR head and merge commit have the same Git tree.
No Wavelength release tag currently contains the merge. The latest stable asset
is still
v0.1.1. Until the next release is published, reproduce the validatedbuild by checking out
da8903b633d0a45122eb2f5cbc72aeb307c52c98in Wavelengthand running:
The framework remains an ignored build artifact. After the next Wavelength
release,
scripts/fetch-xcframework.shwill download its publishedWavewalletdk.xcframework.tar.gzasset through the normal latest-release path.Compatibility and rollout
v0.1.1TimeoutSecondsis ignored safely, but native reads andReceiveremain unboundedReceiveis not recognized as uncertain by SwiftReceiveoutcome reconciles Activity before retryThe wrapper change only classifies returned errors. It does not alter persisted
wallet state, requests already in flight, or the Wavelength wire schema.
Safe rollout order:
da8903b;Validation
Wavewalletdk.xcframeworkfrom the exact merged Wavelength treemake testagainst that frameworkfallback, and an unrelated cancellation negative control
mobile bindings, Postgres, race, lint, static checks, and cross-compilation
activity/details, QR scanning, and Lightning/on-chain send and receive