Skip to content

feat: add ldk-server lightning provider#672

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

feat: add ldk-server lightning provider#672
benthecarman wants to merge 1 commit into
apotdevin:masterfrom
benthecarman:ldk-server

Conversation

@benthecarman
Copy link
Copy Markdown

@benthecarman benthecarman commented Mar 20, 2026

Adds ldk-server as a Lightning provider, enabling ThunderHub to manage LDK-based Lightning nodes alongside LND. The provider communicates with ldk-server over HTTP using protobuf serialization and HMAC-SHA256 authentication.

Supports node info, channels (open/close/config), on-chain wallet, payments (bolt11/keysend), invoices, peers, forwards, message signing, network graph queries, routing fee configuration, and invoice decoding. Real-time event notifications (invoice paid, payment sent, forwards) are available via optional RabbitMQ integration.

Account configuration uses the existing YAML config with type: ldk-server, serverUrl, and authToken (hex-encoded API key). Optional fields include tlsCertPath for TLS certificate verification and rabbitmqUrl/rabbitmqExchangeName for real-time events.

See docs/LDK_SERVER_SETUP.md for the full setup guide and docs/LDK_SERVER_GAPS.md for a detailed breakdown of features that ldk-server doesn't yet support (closed channel history, chain transactions, UTXOs, payment destinations, backups).

I tested basically everything I could, seems like it all works besides what is highlighted in the gaps file.

Draft as we still iron out some ldk-server things

@apotdevin
Copy link
Copy Markdown
Owner

IMO the rabbitmq events are nice but I would keep this PR simpler and have that be a future change

@benthecarman
Copy link
Copy Markdown
Author

IMO the rabbitmq events are nice but I would keep this PR simpler and have that be a future change

We are likely changing out rabbitmq with SSE, would that be better?

Integrate ldk-server as a ThunderHub lightning provider using its gRPC
API. The provider supports core wallet, channel, payment, invoice, peer,
forward, graph, and event flows while documenting the remaining gaps.

Keep ldk-server connections resilient to gRPC session errors and avoid
sending explicit amounts for fixed-amount BOLT11 invoices.
@benthecarman benthecarman marked this pull request as ready for review May 20, 2026 03:07
@benthecarman
Copy link
Copy Markdown
Author

@apotdevin sorry for delay but ldk-server has stablized a lot more now, updated the PR accordingly if you want to review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants