Repository navigation
Conversation
Keep settlement proofs out of debug output before exposing channel payments. Exercise both worker and main-thread logging with nested results.
Register the three facade names and resolve them as one capability. Keep the released AAR and XCFramework usable without referencing missing symbols, and exercise the legacy and channel-capable ABIs.
Expose promotion, pay and receive as an additive client capability. Validate amounts, fee caps and caller-owned replay keys before dispatch, then normalize replies without retrying or falling back to swaps.
Reject unsupported app binaries before starting a channel-enabled wallet or dispatching a payment. Preserve native errors and leave legacy startup and custom clients unchanged.
Make the capability available in worker and main-thread modes. Document the runtime and liquidity prerequisites alongside explicit pay and receive examples.
The bridge and consumer capability checks run under Node without an emulator. Keep them in the build job alongside the other SDK suites.
There was a problem hiding this comment.
🔵 Needs a closer look
The unavailable channel-capable daemon and hub leave money-moving wire contracts and live promotion, fee-cap enforcement, payment, and receive behavior unverified beyond fixtures and mocks.
No open issues 🎉
What changed in this PR
Adds explicit Ark channel operations to the shared SDK contract and official web and React Native clients without changing custom WavelengthClient implementations. These operations require a channel-capable runtime and hub; runtime and dependency pins remain unchanged.
Changes:
- Adds typed promotion, payment, and receive methods with configuration and request validation, without automatic retries or swap fallback.
- Adds native capability detection and compatibility handling for older bindings.
- Redacts payment preimages from web debug logs and expands tests, including React Native transport coverage in CI.
| File | Description |
|---|---|
| packages/web/src/wavewalletdk-worker.js | Redacts preimages in worker debug logs. |
| packages/web/src/util.ts | Redacts preimages in shared web logging. |
| packages/web/src/index.ts | Exposes channel capability from the web factory. |
| packages/web/src/debug-redaction.test.ts | Tests nested payment-preimage redaction. |
| packages/web/README.md | Documents channel usage and runtime requirements. |
| packages/react-native/WavelengthReactNative.podspec | Includes the private C++ bindings header. |
| packages/react-native/test-native/check-ark-bindings.sh | Adds native compatibility harness commands. |
| packages/react-native/test-native/ArkChannelBindingsCheck.kt | Checks Android binding detection and dispatch. |
| packages/react-native/test-native/ark-bindings.mm | Checks iOS binding detection and linking. |
| packages/react-native/src/NativeWavelength.ts | Declares the native channel-capability probe. |
| packages/react-native/src/native-dispatch.test.ts | Extends native dispatch checks to channel methods. |
| packages/react-native/src/index.ts | Exposes channel capability from the native factory. |
| packages/react-native/src/client.ts | Gates channel calls on native support and preserves errors. |
| packages/react-native/src/client.test.ts | Tests dispatch, compatibility guards, and error propagation. |
| packages/react-native/ios/WavelengthModule.mm | Adds channel dispatch and response validation. |
| packages/react-native/ios/WavelengthArkBindings.hpp | Detects complete iOS bindings at compile time. |
| packages/react-native/android/src/main/java/engineering/lightning/wavelength/reactnative/WavelengthModule.kt | Exposes channel support and routes channel calls. |
| packages/react-native/android/src/main/java/engineering/lightning/wavelength/reactnative/ArkChannelBindings.kt | Detects and invokes optional Android bindings. |
| packages/react-native/android/consumer-rules.pro | Preserves reflectively accessed channel methods. |
| packages/react-native/android/build.gradle | Registers consumer shrinker rules. |
| packages/core/src/results.ts | Defines promotion and payment result types. |
| packages/core/src/response-normalization.ts | Normalizes channel receive activity entries. |
| packages/core/src/requests.ts | Defines promotion and fee-capped payment requests. |
| packages/core/src/public-api-assertions.ts | Checks additive channel API signatures. |
| packages/core/src/index.ts | Exports channel contracts and types. |
| packages/core/src/facade.ts | Adds channel verbs, configuration mapping, and request validation. |
| packages/core/src/facade.test.ts | Tests channel configuration forwarding. |
| packages/core/src/errors.ts | Adds the channel-request validation error code. |
| packages/core/src/config.ts | Adds and validates channel opt-in. |
| packages/core/src/config.test.ts | Covers invalid channel configurations. |
| packages/core/src/client.ts | Defines the additive ArkChannelClient interface. |
| packages/core/src/casing.ts | Normalizes ChannelID to channelId. |
| packages/core/src/base-client.ts | Implements shared channel operations. |
| packages/core/src/base-client.test.ts | Tests validation, normalization, and no-fallback behavior. |
| .github/workflows/ci.yml | Runs React Native transport tests in CI. |
Review effort: Balanced
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Collaborator
|
@sputn1ck, remember to re-request review from reviewers when ready |
This branch has not been deployed
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.
What changes
Adds a typed ArkChannelClient capability to the official web and React Native factories without requiring custom WavelengthClient implementations to change. Applications opt in with arkChannelsEnabled and explicitly promote VTXOs, pay an invoice with a fee cap, or issue an invoice against existing inbound liquidity. No automatic retry or swap fallback.
The native bridge detects complete channel bindings before dispatch, including after a JS-only update. Web debug logs redact payment preimages. PR CI now exercises the React Native transport tests.
Runtime compatibility
This SDK-only PR does not bump package versions, the v0.2.1 runtime pin, asset digests, or native dependency pins. Existing released binaries do not provide the new operations. Using them requires a channel-capable runtime and hub; this PR does not deliver or deploy either.
Verification