Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
8517037
Add Cli command for Bolt12Receive
G8XSU Sep 10, 2024
10d4029
Add Cli command for Bolt12Send
G8XSU Sep 10, 2024
033457c
Add Cli command for OpenChannel
G8XSU Sep 10, 2024
adb0605
Exit with status code 1 on error.
G8XSU Sep 11, 2024
810161f
Merge pull request #6 from G8XSU/cli-base-setup
G8XSU Sep 12, 2024
c6d9d97
Remove PaymentId as separate type from api.
G8XSU Sep 25, 2024
8723504
Add Impl for OnchainReceive Api
G8XSU Sep 4, 2024
79c4a21
Add Impl for OnchainSend Api
G8XSU Sep 4, 2024
8f5eb8a
Add Impl for BOLT11Receive Api
G8XSU Sep 4, 2024
e04e767
Add Impl for OpenChannel Api
G8XSU Sep 4, 2024
fa2be30
Add Impl for Bolt11Send Api
G8XSU Sep 4, 2024
de57ea1
Add Impl for Bolt12Receive Api
G8XSU Sep 5, 2024
47fef75
Add Impl for Bolt12Send Api
G8XSU Sep 5, 2024
8a9764c
Add Impl for CloseChannel Api
G8XSU Sep 11, 2024
7e69831
Merge pull request #5 from G8XSU/impl-s1-apis
tnull Sep 25, 2024
3167f2c
Add suggestions/error-context clap features.
G8XSU Sep 26, 2024
c89ae4e
Exclude '/' from path pattern matching.
G8XSU Sep 26, 2024
78f482a
Merge pull request #8 from G8XSU/09-26-minor-fixes
tnull Oct 11, 2024
d2ef390
Group similar imports.
G8XSU Oct 13, 2024
24ffd37
Minor proto changes for ListChannels Impl.
G8XSU Oct 13, 2024
e24425b
Add impl for ListChannels Api.
G8XSU Oct 13, 2024
89d9308
Add proto for GetNodeInfo.
G8XSU Oct 13, 2024
729e672
Add impl for GetNodeInfo Api.
G8XSU Oct 13, 2024
39ad7cb
Merge pull request #13 from G8XSU/s2-apis
G8XSU Oct 18, 2024
8c63b45
Upgrade Ldk-node to v0.4.0 / Ldk to v0.0.125
G8XSU Oct 18, 2024
3a9f879
Proto changes for upgrading LDK-node to v0.4.0
G8XSU Oct 18, 2024
4521fd2
Adjust for node interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
b86615e
Adjust for ChannelConfig interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
e1ce669
Adjust OpenChannel for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
50aa7c2
Adjust GetNodeInfo for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
0ce52e6
Adjust CloseChannel for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
5be1fad
Adjust Bolt11Send for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
8f64512
Adjust Bolt11Receive for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
cd27125
Adjust Bolt12Send for interface change in ldk-node upgrade.
G8XSU Oct 18, 2024
a666dc9
Cli interface change for ldk-node upgrade.
G8XSU Oct 18, 2024
f847474
Merge pull request #18 from G8XSU/ldk-125-upgrade
G8XSU Oct 21, 2024
7f1e2a3
Add proto for GetPaymentDetails api.
G8XSU Oct 14, 2024
15a59ce
Add proto for ListPayments api.
G8XSU Oct 14, 2024
aafab22
Add Impl for GetPaymentDetails Api
G8XSU Oct 14, 2024
02e9634
Add Impl for ListPayments Api
G8XSU Oct 14, 2024
7705d6e
Merge pull request #15 from G8XSU/payment-apis
G8XSU Oct 21, 2024
34f01e5
Add proto for UpdateChannelConfig api.
G8XSU Oct 14, 2024
3ce2d40
Add impl for UpdateChannelConfig Api.
G8XSU Oct 15, 2024
b888fdc
Merge pull request #16 from G8XSU/update-fees
G8XSU Oct 22, 2024
b917821
Move existing protos to api and types mod.
G8XSU Oct 30, 2024
45efc09
Adjust ldk-node-server acc. to proto path changes.
G8XSU Oct 30, 2024
009bf3b
Adjust client acc. to proto path changes.
G8XSU Oct 30, 2024
da73149
Adjust cli acc. to proto path changes.
G8XSU Oct 30, 2024
452395c
Add proto definitions for ErrorResponse.
G8XSU Nov 5, 2024
affb0b5
Add error struct for LdkServerError.
G8XSU Nov 5, 2024
d51ec20
Merge pull request #20 from G8XSU/error-model-2
G8XSU Nov 7, 2024
cf3a68d
RIP Esplora, configure bitcoin-d as chain source.
G8XSU Nov 5, 2024
89b3a24
Merge pull request #21 from G8XSU/bitcoin-d
tnull Nov 8, 2024
d45c9a1
Add interface for PaginatedKVStore.
G8XSU Nov 14, 2024
d3fd7d1
Merge pull request #22 from G8XSU/paginated-store
G8XSU Nov 23, 2024
9bd1d13
Rename to LdkServer.
G8XSU Nov 22, 2024
18a7b88
Merge pull request #24 from G8XSU/ldk-server-rename
G8XSU Nov 25, 2024
01494c8
Rename crates to have ldk-server- prefix.
G8XSU Nov 25, 2024
29aa455
Merge pull request #25 from G8XSU/crates-rename
G8XSU Nov 25, 2024
2cfdc7e
Add proto definition for GetBalances API.
G8XSU Nov 27, 2024
ff97fac
Fix typo in error proto.
G8XSU Nov 27, 2024
85ec0e6
Add GetBalances API impl.
G8XSU Nov 27, 2024
4fc6eb1
Merge pull request #26 from G8XSU/node-balances
G8XSU Dec 3, 2024
fc60129
Add docs for API response objects.
G8XSU Dec 3, 2024
6b45123
Merge pull request #27 from G8XSU/response-docs
G8XSU Dec 3, 2024
6bdcf01
Add file based Config support.
G8XSU Dec 4, 2024
2fdf44b
Merge pull request #28 from G8XSU/file-config
G8XSU Dec 4, 2024
73f4abe
Fix PaginatedKVStore interface to account for time ordering in pagina…
G8XSU Dec 2, 2024
89c718e
Add Sqlite based PaginatedKVStore impl.
G8XSU Nov 26, 2024
8af2e0a
Merge pull request #23 from G8XSU/sqlite-paginated-impl
G8XSU Dec 4, 2024
96840c8
Easy to have sane defaults with polar.
G8XSU Dec 6, 2024
61da4d5
Merge pull request #30 from G8XSU/sane-default-config
arik-so Dec 6, 2024
fdd6bad
Add Basic project description and README.md
G8XSU Dec 4, 2024
6b9d2c4
Merge pull request #31 from G8XSU/readme-basic
G8XSU Dec 7, 2024
03d45a0
Add cli missing commands
dzdidi Dec 9, 2024
7b0f160
Merge pull request #34 from dzdidi/main
G8XSU Dec 9, 2024
8310407
server: do not panic on --help command
vincenzopalazzo Dec 7, 2024
dfa0e96
core: sanity check about the config file
vincenzopalazzo Dec 10, 2024
8a7dd1e
Merge pull request #33 from vincenzopalazzo/macros/fix-help-command
G8XSU Dec 11, 2024
0c18c44
Create index on creation_time only if it doesn't exist.
G8XSU Dec 11, 2024
fd9e9d4
Merge pull request #35 from G8XSU/fix_creation_time_index
arik-so Dec 12, 2024
b9fd988
Move ldk-node dependency to github commit version.
G8XSU Dec 6, 2024
bab8e1b
Add proto definition for ListForwardedPayments API.
G8XSU Dec 6, 2024
8629b82
Start storing ForwardedPayments using PaginatedKVStore.
G8XSU Dec 6, 2024
34e81a9
Move Arc<Node> to Context.
G8XSU Dec 6, 2024
f2a7927
Add Api impl for ListForwardedPayments.
G8XSU Dec 6, 2024
0ae142c
Merge pull request #32 from G8XSU/forwarded-payments
G8XSU Dec 13, 2024
9f6ac77
Upgrade LDK Node version.
G8XSU Feb 19, 2025
3393e9d
Update Cargo.lock
G8XSU Feb 19, 2025
dd247cf
Bump MSRV to 1.75.0
G8XSU Feb 20, 2025
d3c0fa4
Add prev_node_id and next_node_id in PaymentForwarded proto.
G8XSU Feb 12, 2025
2afc5cb
Start storing prev_node_id and next_node_id for PaymentForwardedEvents.
G8XSU Feb 12, 2025
31af899
Ignore new fields for PaymentReceived event.
G8XSU Feb 20, 2025
e1291a5
Account for Bolt11InvoiceDescription.
G8XSU Feb 14, 2025
c1fb517
Account for FeeRate in OnchainSend.
G8XSU Feb 19, 2025
7afeef8
Configure logging using new LDK Node api.
G8XSU Feb 19, 2025
91b1e85
Expose txid and confirmation_status for onchain payments.
G8XSU Feb 19, 2025
bdb12a0
Merge pull request #45 from G8XSU/ldk-node-upgrade-for-log
G8XSU Feb 25, 2025
f4c1692
Derive traits for LdkServerError.
G8XSU Feb 26, 2025
31a8d13
Implement Display & std::Error for LdkServerError.
G8XSU Feb 26, 2025
a74afa5
Add constructor for LdkServerError.
G8XSU Feb 26, 2025
e4decba
Return LdkServerError from NodeService.
G8XSU Feb 26, 2025
8f318a6
Return LdkServerError from GetNodeInfo API.
G8XSU Feb 26, 2025
027436e
Return LdkServerError from GetBalances API.
G8XSU Feb 26, 2025
b96be72
Impl from<NodeError> for LdkServerError.
G8XSU Feb 26, 2025
57ea1d2
Return LdkServerError from OnchainReceive API.
G8XSU Feb 26, 2025
f2dc683
Return LdkServerError from OnchainSend API.
G8XSU Feb 26, 2025
3375673
Return LdkServerError from Bolt11Receive API.
G8XSU Feb 26, 2025
ca62635
Return LdkServerError from Bolt11Send API.
G8XSU Feb 26, 2025
5c2c2e6
Return LdkServerError from Bolt12Receive API.
G8XSU Feb 26, 2025
321da5f
Return LdkServerError from Bolt12Send API.
G8XSU Feb 26, 2025
0f366db
Return LdkServerError from OpenChannel API.
G8XSU Feb 26, 2025
5231a9b
Return LdkServerError from CloseChannel API.
G8XSU Feb 26, 2025
a63c1da
Return LdkServerError from ListChannels API.
G8XSU Feb 26, 2025
093eb8b
Return LdkServerError from UpdateChannelConfig API.
G8XSU Feb 26, 2025
88929c1
Return LdkServerError from GetPaymentDetails API.
G8XSU Feb 26, 2025
68ecb29
Return LdkServerError from ListPayments API.
G8XSU Feb 26, 2025
2cd8435
Return LdkServerError from ListForwardedPayments API.
G8XSU Feb 26, 2025
fd6a5d4
Initialize vec with capacity, to pre-allocate space.
G8XSU Feb 26, 2025
d75ffce
Return protobuf serialized ErrorResponse from APIs.
G8XSU Feb 27, 2025
5dd656d
Add ErrorResponse handling in client.
G8XSU Feb 27, 2025
df7d376
Add ErrorResponse handling in cli.
G8XSU Feb 27, 2025
303d504
Merge pull request #46 from G8XSU/25-02-error-handling
G8XSU Feb 28, 2025
4811d19
Start storing payments using PaginatedKVStore.
G8XSU Mar 5, 2025
1e4f0c0
API changes to support pagination in ListPayments.
G8XSU Mar 5, 2025
c90d13f
Remove unused tokio dependency.
G8XSU Mar 6, 2025
274fbf3
Disable default features for bytes and rand crates.
G8XSU Mar 6, 2025
f4eaf7a
Update Cargo.lock
G8XSU Mar 6, 2025
40ca46d
Merge pull request #50 from G8XSU/2025-03-06-dep-cleanup
G8XSU Mar 6, 2025
9d8736c
Support pagination in ListPayments API.
G8XSU Mar 5, 2025
9aa4e4b
Support pagination in CLI for ListPayments API.
G8XSU Mar 6, 2025
ce00165
Merge pull request #49 from G8XSU/payments-pagination-2
G8XSU Mar 7, 2025
c270645
Refactor persistance related IO to separate module.
G8XSU Mar 12, 2025
699f592
Remove description_hash short arg in CLI receive command
elnosh Mar 15, 2025
b540e12
Merge pull request #54 from elnosh/flag-receive
G8XSU Mar 18, 2025
22d6325
Add basic structure for defining different events.
G8XSU Mar 12, 2025
703dbee
Introduce EventPublisher trait.
G8XSU Mar 12, 2025
7bd1221
Add NoopEventPublisher, which will be used as default impl.
G8XSU Mar 12, 2025
73bb842
Start publishing events using EventPublisher.
G8XSU Mar 12, 2025
e354298
Merge pull request #51 from G8XSU/2025-03-12-events
G8XSU Mar 18, 2025
5298004
Consistently use UserChannelId as String.
G8XSU Mar 18, 2025
55b8492
Consistently use PaymentId as hex-string.
G8XSU Mar 18, 2025
046972f
Merge pull request #56 from G8XSU/2025-03-18-close-channel-api-fix
G8XSU Mar 18, 2025
fc4e4d8
Upgrade ldk-node to latest commit.
G8XSU Mar 20, 2025
7ae24b1
Add Send+Sync trait bounds for PaginatedKVStore.
G8XSU Mar 18, 2025
db8922b
Add Send+Sync trait bounds for EventPublisher.
G8XSU Mar 18, 2025
c893b8f
Add event types for PaymentReceived, PaymentSuccessful & PaymentFailed.
G8XSU Mar 17, 2025
afad40d
Start publishing more payment events using EventPublisher.
G8XSU Mar 18, 2025
3af239b
Add `fee_paid_msat` in Payment.
G8XSU Mar 20, 2025
89774e8
Merge pull request #57 from G8XSU/2025-03-14-more-events
G8XSU Mar 20, 2025
f902060
Add RabbitMQ based EventPublisher Impl.
G8XSU Mar 13, 2025
dc4124a
Publish events to RabbitMQ queue if events-rabbitmq feature is enabled.
G8XSU Mar 13, 2025
7fb66b3
Add Integration test for RabbitMqEventPublisher.
G8XSU Mar 18, 2025
4743c36
Merge pull request #53 from G8XSU/2025-03-12-rabbitmq-impl
G8XSU Mar 20, 2025
2d23e1d
Fix ldk-server.config
G8XSU Mar 21, 2025
be92a59
Update Cargo.lock
G8XSU Mar 21, 2025
0ab43a8
Merge pull request #64 from G8XSU/fix-ldk-config-bitcoind-pass
G8XSU Mar 21, 2025
e7d7e21
Add TOML-based configuration support.
G8XSU Mar 21, 2025
2b9f5e8
Merge pull request #59 from G8XSU/25-3-20-fee-info
G8XSU Mar 21, 2025
c64e50e
Merge pull request #62 from G8XSU/25-3-20-toml
G8XSU Mar 21, 2025
e3bfe90
Add experimental LSPS2 support.
G8XSU Mar 21, 2025
025f9a1
Remove unused ldk-server.config
G8XSU Mar 22, 2025
48a64ac
Log and exit in case of invalid configuration.
G8XSU Mar 28, 2025
08840f2
Merge pull request #60 from G8XSU/25-3-20-lsps2
G8XSU Mar 31, 2025
9cef61d
Refactor CloseChannel API to remove force close functionality
moisesPompilio Jun 26, 2025
f21b502
add close channel in the cli
moisesPompilio Jun 26, 2025
20f5623
Add force_close_channel API endpoint and handler
moisesPompilio Jun 26, 2025
2ed7d7a
add force close channel in the cli
moisesPompilio Jun 27, 2025
2e90606
fix configuration file name in running instructions
moisesPompilio Jun 27, 2025
d6d360e
Merge pull request #65 from moisesPompilio/issue-55
jkczyz Jul 15, 2025
a5ea162
Allow setting alias in config
benthecarman Jul 22, 2025
e9aa2ec
Merge pull request #67 from benthecarman/alias-config
tnull Jul 28, 2025
22864fa
Add esplora chain source
tankyleo Nov 15, 2025
d5c6e40
Merge pull request #74 from tankyleo/esplora-config
benthecarman Nov 20, 2025
310aa81
Update ldk-node to 0.7.0
benthecarman Dec 1, 2025
cec76fc
Update MSRV in CI to 1.85
benthecarman Dec 1, 2025
522709d
Merge pull request #72 from jkczyz/2025-10-bump-ldk-node
tnull Dec 4, 2025
ad3eb56
Add configurable log level and log file
benthecarman Dec 3, 2025
649a608
Merge pull request #76 from benthecarman/log
tnull Dec 9, 2025
6407953
Limit request body size to 10MB
benthecarman Dec 9, 2025
e88fe09
Hook up ChannelConfig in open channel endpoint
benthecarman Dec 10, 2025
a06b4eb
Move endpoint path constants to shared defintion
benthecarman Dec 10, 2025
ace5197
Merge pull request #80 from benthecarman/limit-body
tnull Dec 10, 2025
fac5dba
Merge pull request #82 from benthecarman/shared-endpoints
tnull Dec 10, 2025
1d1cd59
add `RouteParametersConfig` struct to proto types
Anyitechs Dec 9, 2025
c118e68
allow `route_parameters` in BOLT11 & BOLT12 send API
Anyitechs Dec 9, 2025
fd0d364
Add splicing RPCs and CLI commands
jkczyz Oct 21, 2025
3b5616c
Merge pull request #73 from jkczyz/2025-10-splicing
tnull Dec 11, 2025
85cde3c
Add ChannelConfig options to open channel cli command
benthecarman Dec 10, 2025
3cfce29
Merge pull request #81 from benthecarman/open-channel-cfg
wpaulino Dec 11, 2025
f3ac542
Merge pull request #79 from Anyitechs/introduce-SendingParameters
benthecarman Dec 11, 2025
0fe905b
Add update channel config cli command
benthecarman Dec 11, 2025
407650e
Merge pull request #83 from benthecarman/update-channel-config-cli
tnull Dec 12, 2025
0e4064d
Make cli output json
benthecarman Dec 9, 2025
23f79ef
Make expiry_secs optional for bolt11-receive
elnosh Dec 13, 2025
5281c21
Merge pull request #85 from elnosh/expiry-secs-optional
benthecarman Dec 13, 2025
2d0562e
Merge pull request #78 from benthecarman/json-cli
tnull Dec 15, 2025
6fac846
Add licensing headers to all Rust files
tnull Dec 17, 2025
9f41773
Merge pull request #87 from tnull/2025-12-add-licensing-headers
benthecarman Dec 17, 2025
c7fe1d0
Implement proper pagination for list-payments cli
benthecarman Dec 11, 2025
fe11463
Do not use buffered writers to write lines to the log file
tankyleo Dec 20, 2025
b3b861f
Add electrum chain source
tankyleo Dec 20, 2025
7b75507
Merge pull request #89 from tankyleo/log-with-linewriter
benthecarman Dec 20, 2025
f69ae4e
Merge pull request #90 from tankyleo/electrum-config
benthecarman Dec 20, 2025
e72c6f5
Fix clippy issues, enforce in CI
benthecarman Dec 17, 2025
1778151
Merge pull request #86 from benthecarman/clippy
tnull Jan 5, 2026
d82c881
Merge pull request #84 from benthecarman/pagination-payments
benthecarman Jan 7, 2026
2efa91b
Fix clippy issue from #84
benthecarman Jan 9, 2026
0a965b0
Merge pull request #91 from benthecarman/fix-clippy
benthecarman Jan 9, 2026
457e92a
Add HMAC-based authentication for RPC/CLI
benthecarman Dec 18, 2025
0a0ebc8
Merge pull request #88 from benthecarman/auth
tnull Jan 12, 2026
e6b51e5
Bump ldk-node to latest main
joostjager Jan 13, 2026
dc712cd
Merge pull request #93 from lightningdevkit/bump-node
benthecarman Jan 13, 2026
d387893
Add TLS support for RPC/CLI
benthecarman Jan 9, 2026
f03d22a
Merge pull request #92 from benthecarman/tls
tnull Jan 13, 2026
813260d
Update `rustfmt.toml` to support `nightly` flags
tnull Jan 16, 2026
2aa1f7b
Apply `cargo +nightly fmt` once
tnull Jan 16, 2026
cdf90c2
Add weekly CI job running `cargo +nightly fmt`
tnull Jan 16, 2026
b38563c
Merge pull request #97 from tnull/2026-01-add-weekly-nightly-rustfmt-job
benthecarman Jan 16, 2026
e2ac232
2026-01-18 automated rustfmt nightly
Jan 18, 2026
bdc7b94
Merge pull request #99 from lightningdevkit/create-pull-request/patch
benthecarman Jan 18, 2026
4434bc3
Add announcement addresses setting
tankyleo Jan 18, 2026
36ef618
Make listening addresses optional, and allow multiple to be set
tankyleo Jan 18, 2026
15685c8
Add coverage for a few more fields in `load_config`
tankyleo Jan 18, 2026
55ce9cd
Fix comment in the configuration file
tankyleo Jan 18, 2026
f3738d7
Merge pull request #100 from tankyleo/26-01-ann-addr
benthecarman Jan 18, 2026
19c625b
Correct the name of the file path setting to the expected one
tankyleo Jan 19, 2026
316403e
Correct the name of the TLS cert file in comments and help messages
tankyleo Jan 19, 2026
86563e4
Merge pull request #101 from tankyleo/26-01-typo-fixes
benthecarman Jan 19, 2026
901902d
Create default data directory at ~/.ldk-server
benthecarman Jan 14, 2026
e8c38c3
Merge pull request #96 from benthecarman/default-data-dir
tnull Jan 19, 2026
5752cad
2026-01-19 automated rustfmt nightly
Jan 19, 2026
9a6c8ec
Merge pull request #104 from lightningdevkit/create-pull-request/patch
tnull Jan 19, 2026
1084b5c
Add help text for all cli commands and args
benthecarman Jan 19, 2026
28845ae
Merge pull request #102 from benthecarman/help-text
tnull Jan 19, 2026
b5b4133
Add GetPaymentDetails to client and CLI
benthecarman Jan 14, 2026
a3a7481
Add ListForwardedPayments to client and CLI
benthecarman Jan 14, 2026
13ee0e5
Add support for bash completions
benthecarman Jan 19, 2026
b727c96
Merge pull request #95 from benthecarman/remaining-missing-cmds
benthecarman Jan 20, 2026
03027fc
Merge pull request #105 from benthecarman/bash-completion
tnull Jan 21, 2026
0b141da
Create storage directory before generating API key
joostjager Jan 22, 2026
f454dcb
Merge pull request #110 from joostjager/create-api-key-dir
benthecarman Jan 22, 2026
4455a7a
Add ConnectPeer API endpoint
joostjager Jan 22, 2026
a3f3678
Merge pull request #107 from joostjager/connect-peer
benthecarman Jan 23, 2026
7317317
2026-01-25 automated rustfmt nightly
Jan 25, 2026
0e6211b
Merge pull request #116 from lightningdevkit/create-pull-request/patch
benthecarman Jan 25, 2026
db58acb
Add node `alias` to config file
Anyitechs Jan 27, 2026
0151b43
Merge pull request #118 from Anyitechs/add-alias
benthecarman Jan 27, 2026
a723149
Merge remote-tracking branch 'ldk-server/main' into ldk-server
joostjager Jan 28, 2026
025e6d2
Integrate ldk-server into workspace
joostjager Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ldk-server-rabbitmq-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: LDK Server - RabbitMQ Integration Tests

on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
integration-tests:
runs-on: ubuntu-latest

services:
rabbitmq:
image: rabbitmq:3
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run RabbitMQ integration tests
run: cargo test -p ldk-server --features integration-tests-events-rabbitmq --verbose --color=always -- --nocapture
env:
RUST_BACKTRACE: 1
43 changes: 43 additions & 0 deletions .github/workflows/ldk-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI Checks - LDK Server

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
platform: [
ubuntu-latest,
macos-latest,
]
toolchain: [
stable,
beta,
1.85.0, # MSRV, same as ldk-node
]
include:
- toolchain: 1.85.0
msrv: true
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust ${{ matrix.toolchain }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
if [ "${{ matrix.msrv }}" = "true" ]; then rustup component add clippy; fi
- name: Build ldk-server crates on Rust ${{ matrix.toolchain }}
run: cargo build -p ldk-server -p ldk-server-cli -p ldk-server-client -p ldk-server-protos --verbose --color always
- name: Check clippy on ldk-server if on msrv
if: matrix.msrv
run: cargo clippy -p ldk-server --all-features -- -D warnings
- name: Test ldk-server crates on Rust ${{ matrix.toolchain }}
run: cargo test -p ldk-server -p ldk-server-cli -p ldk-server-client -p ldk-server-protos
- name: Cargo check release on Rust ${{ matrix.toolchain }}
run: cargo check --release -p ldk-server -p ldk-server-cli -p ldk-server-client -p ldk-server-protos
- name: Cargo check doc on Rust ${{ matrix.toolchain }}
run: cargo doc --release -p ldk-server -p ldk-server-cli -p ldk-server-client -p ldk-server-protos
21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[workspace]
resolver = "2"
members = [
"ldk-server/ldk-server",
"ldk-server/ldk-server-cli",
"ldk-server/ldk-server-client",
"ldk-server/ldk-server-protos",
]

[package]
name = "ldk-node"
version = "0.8.0+git"
Expand Down Expand Up @@ -110,6 +119,18 @@ uniffi = { version = "0.28.3", features = ["build"], optional = true }
[profile.release]
panic = "abort"

[profile.release.package.ldk-server]
opt-level = 3

[profile.release.package.ldk-server-cli]
opt-level = 3

[profile.release.package.ldk-server-client]
opt-level = 3

[profile.release.package.ldk-server-protos]
opt-level = 3

[profile.dev]
panic = "abort"

Expand Down
1 change: 1 addition & 0 deletions ldk-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
72 changes: 72 additions & 0 deletions ldk-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# LDK Server

**LDK Server** is a fully-functional Lightning node in daemon form, built on top of
[LDK Node](https://github.com/lightningdevkit/ldk-node), which itself provides a powerful abstraction over the
[Lightning Development Kit (LDK)](https://github.com/lightningdevkit/rust-lightning) and uses a built-in
[Bitcoin Development Kit (BDK)](https://bitcoindevkit.org/) wallet.

The primary goal of LDK Server is to provide an efficient, stable, and API-first solution for deploying and managing
a Lightning Network node. With its streamlined setup, LDK Server enables users to easily set up, configure, and run
a Lightning node while exposing a robust, language-agnostic API via [Protocol Buffers (Protobuf)](https://protobuf.dev/).

### Features

- **Out-of-the-Box Lightning Node**:
- Deploy a Lightning Network node with minimal configuration, no coding required.

- **API-First Design**:
- Exposes a well-defined API using Protobuf, allowing seamless integration with HTTP-clients or applications.

- **Powered by LDK**:
- Built on top of LDK-Node, leveraging the modular, reliable, and high-performance architecture of LDK.

- **Effortless Integration**:
- Ideal for embedding Lightning functionality into payment processors, self-hosted nodes, custodial wallets, or other Lightning-enabled
applications.

### Project Status

🚧 **Work in Progress**:
- **APIs Under Development**: Expect breaking changes as the project evolves.
- **Potential Bugs and Inconsistencies**: While progress is being made toward stability, unexpected behavior may occur.
- **Improved Logging and Error Handling Coming Soon**: Current error handling is rudimentary (specially for CLI), and usability improvements are actively being worked on.
- **Pending Testing**: Not tested, hence don't use it for production!

We welcome your feedback and contributions to help shape the future of LDK Server!


### Configuration
Refer `./ldk-server/ldk-server-config.toml` to see available configuration options.

### Building
```
git clone https://github.com/lightningdevkit/ldk-server.git
cargo build
```

### Running
```
cargo run --bin ldk-server ./ldk-server/ldk-server-config.toml
```

Interact with the node using CLI:
```
ldk-server-cli -b localhost:3002 --api-key your-secret-api-key --tls-cert /path/to/tls_cert.pem onchain-receive # To generate onchain-receive address.
ldk-server-cli -b localhost:3002 --api-key your-secret-api-key --tls-cert /path/to/tls_cert.pem help # To print help/available commands.
```

### Shell Completions

The CLI supports generating shell completions for Bash, Zsh, Fish, Elvish, and PowerShell.

Add completions to your shell config:
```bash
# Bash (add to ~/.bashrc)
eval "$(ldk-server-cli completions bash)"

# Zsh (add to ~/.zshrc)
eval "$(ldk-server-cli completions zsh)"

# Fish (add to ~/.config/fish/config.fish)
ldk-server-cli completions fish | source
```
14 changes: 14 additions & 0 deletions ldk-server/ldk-server-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "ldk-server-cli"
version = "0.1.0"
edition = "2021"

[dependencies]
ldk-server-client = { path = "../ldk-server-client", features = ["serde"] }
clap = { version = "4.0.5", default-features = false, features = ["derive", "std", "error-context", "suggestions", "help"] }
clap_complete = { version = "4.0", default-features = false }
hex-conservative = { version = "0.2", default-features = false, features = ["std"] }
tokio = { version = "1.38.0", default-features = false, features = ["rt-multi-thread", "macros"] }
serde = "1.0"
serde_json = "1.0"
toml = { version = "0.8", default-features = false, features = ["parse"] }
82 changes: 82 additions & 0 deletions ldk-server/ldk-server-cli/src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// This file is Copyright its original authors, visible in version control
// history.
//
// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// You may not use this file except in accordance with one or both of these
// licenses.

use std::path::PathBuf;

use serde::{Deserialize, Serialize};

const DEFAULT_CONFIG_FILE: &str = "config.toml";
const DEFAULT_CERT_FILE: &str = "tls.crt";
const API_KEY_FILE: &str = "api_key";

pub fn get_default_data_dir() -> Option<PathBuf> {
#[cfg(target_os = "macos")]
{
#[allow(deprecated)] // todo can remove once we update MSRV to 1.87+
std::env::home_dir().map(|home| home.join("Library/Application Support/ldk-server"))
}
#[cfg(target_os = "windows")]
{
std::env::var("APPDATA").ok().map(|appdata| PathBuf::from(appdata).join("ldk-server"))
}
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
{
#[allow(deprecated)] // todo can remove once we update MSRV to 1.87+
std::env::home_dir().map(|home| home.join(".ldk-server"))
}
}

pub fn get_default_config_path() -> Option<PathBuf> {
get_default_data_dir().map(|dir| dir.join(DEFAULT_CONFIG_FILE))
}

pub fn get_default_cert_path() -> Option<PathBuf> {
get_default_data_dir().map(|path| path.join(DEFAULT_CERT_FILE))
}

pub fn get_default_api_key_path(network: &str) -> Option<PathBuf> {
get_default_data_dir().map(|path| path.join(network).join(API_KEY_FILE))
}

#[derive(Debug, Deserialize)]
pub struct Config {
pub node: NodeConfig,
pub tls: Option<TlsConfig>,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct TlsConfig {
pub cert_path: Option<String>,
}

#[derive(Debug, Deserialize)]
pub struct NodeConfig {
pub rest_service_address: String,
network: String,
}

impl Config {
pub fn network(&self) -> Result<String, String> {
match self.node.network.as_str() {
"bitcoin" | "mainnet" => Ok("bitcoin".to_string()),
"testnet" => Ok("testnet".to_string()),
"testnet4" => Ok("testnet4".to_string()),
"signet" => Ok("signet".to_string()),
"regtest" => Ok("regtest".to_string()),
other => Err(format!("Unsupported network: {other}")),
}
}
}

pub fn load_config(path: &PathBuf) -> Result<Config, String> {
let contents = std::fs::read_to_string(path)
.map_err(|e| format!("Failed to read config file '{}': {}", path.display(), e))?;
toml::from_str(&contents)
.map_err(|e| format!("Failed to parse config file '{}': {}", path.display(), e))
}
Loading
Loading