Skip to content

Add LDK Server backend#4107

Open
benthecarman wants to merge 1 commit into
ZeusLN:masterfrom
benthecarman:ldk-server
Open

Add LDK Server backend#4107
benthecarman wants to merge 1 commit into
ZeusLN:masterfrom
benthecarman:ldk-server

Conversation

@benthecarman
Copy link
Copy Markdown
Contributor

@benthecarman benthecarman commented May 20, 2026

Description

Relates to issue: ZEUS-0000

Wire LDK Server into remote node configuration, backend selection, invoice polling, and shared LDK behavior. Add generated protobuf bindings and document the supported feature surface.

I got it able to connect on my phone and told codex good job and to clean up and commit. Have not reviewed the actual logic yet but opening for now!

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub
  • LDK Server 🚀

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for LDK Server as a new backend, including the necessary gRPC backend implementation, protobuf definitions, and UI updates for wallet configuration. It also updates documentation and project templates to reflect this new integration. My feedback suggests replacing the magic number '660' in the LdkServer backend with a named constant for better maintainability and moving the hardcoded API key placeholder in the WalletConfiguration view to the localization files to support internationalization.

Comment thread backends/LdkServer.ts
Comment thread views/Settings/WalletConfiguration.tsx Outdated
@benthecarman benthecarman force-pushed the ldk-server branch 2 times, most recently from dfefea3 to f0c050e Compare May 20, 2026 05:48
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for LDK Server as a new remote node backend, implementing the LdkServer class for gRPC communication, adding Protobuf definitions, and updating the UI for node configuration. The code review feedback highlights reliability concerns in the gRPC implementation, specifically regarding potential resource leaks and the need for native timeouts. There is also a recommendation to simplify channel balance calculations and eliminate magic numbers.

Comment thread backends/LdkServer.ts Outdated
Comment thread backends/LdkServer.ts
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for LDK Server as a new remote node backend. It includes a new LdkServer backend implementation using gRPC over HTTPS, updated Protobuf definitions, and UI enhancements for node configuration. Feedback suggests refining the msatToSat utility to ensure satoshi values are returned as whole numbers and replacing a magic number in the channel balance calculation with a named constant for better maintainability.

Comment thread backends/LdkServer.ts
Comment thread backends/LdkServer.ts
Copy link
Copy Markdown
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benthecarman we only need change in en.json locales

@benthecarman benthecarman force-pushed the ldk-server branch 2 times, most recently from b7bb78a to 52eb30f Compare May 20, 2026 20:44
@benthecarman benthecarman marked this pull request as ready for review May 20, 2026 23:01
@kaloudis kaloudis added this to the v13.1.0 milestone May 21, 2026
@benthecarman
Copy link
Copy Markdown
Contributor Author

@benthecarman we only need change in en.json locales

fixed i think

Copy link
Copy Markdown
Contributor

@ajaysehwal ajaysehwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/benthecarman/zeus/blob/8a17dd666f0a792c1704155786abc7a572517d2c/views/Receive.tsx#L1041

@benthecarman, On-chain “payment received” detection never works because LdkServer.formatOnchainTransaction never fills dest_addresses or output_details, and we are not using status too

Comment thread backends/LdkServer.ts Outdated
Wire LDK Server into remote node configuration, backend selection,
invoice polling, and shared LDK behavior. Add generated protobuf
bindings and document the supported feature surface.
@benthecarman
Copy link
Copy Markdown
Contributor Author

benthecarman/zeus@8a17dd6/views/Receive.tsx#L1041

@benthecarman, On-chain “payment received” detection never works because LdkServer.formatOnchainTransaction never fills dest_addresses or output_details, and we are not using status too

This is because we have a bug where on-chain payments aren't returned at all 😅 fixed in ldk-server here: lightningdevkit/ldk-server#219

@kaloudis kaloudis modified the milestones: v13.1.0, v13.2.0 May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants