Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Add initial guides & documentation by benthecarman · Pull Request #186 · lightningdevkit/ldk-server · GitHub
Skip to content

Add initial guides & documentation - #186

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs
Apr 16, 2026
Merged

Add initial guides & documentation#186
tnull merged 1 commit into
lightningdevkit:mainfrom
benthecarman:docs

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Add docs/ directory with guides for getting started, configuration, the gRPC API, Tor setup, and production operations. Add per-crate READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.

Include READMEs in lib.rs via doc = include_str! so rustdoc validates the code examples. Update the root README to link to the new docs and fix outdated REST/port references.

Some of the things documented are still subject to change (auth) but if we're able to land this first, we can then just update the docs with the changes as well.

@ldk-reviews-bot

ldk-reviews-bot commented Apr 14, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman
benthecarman requested a review from tnullApril 14, 2026 21:47
@benthecarman
benthecarmanforce-pushed the docs branch 4 times, most recently from ba54d2f to fbba9baCompareApril 14, 2026 21:54

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threaddocs/api-guide.md
## Transport

- **Protocol:** gRPC over HTTP/2 with TLS (self-signed by default)
- **Default address:** `127.0.0.1:3536`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, but especially if we want to document concrete values, do we have a plan for how to keep the API docs here in-sync and up-to-date with the actual implementation? Could we somehow check that in CI? Or would it make sense to have this live in or generated by rustdoc, so that we can link to the actual values in the code?

@benthecarmanbenthecarmanApr 15, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We could put these as docs in the rust files so we could use the consts but feels out of place. Otherwise, not really sure how we'd enforce because its pretty unstructured and hard to detect, maybe having claude verify?

I agree this can be a problem but most of these things should be pretty unchanging (don't see why we'd change the default port). Maybe just remove the Endpoint Reference section as that will have the most changes and just keep sections like Hodl Invoice Lifecycle and Pagination that just explain higher level flows rather than individual endpoints.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/configuration.md

Requires the LSP's public key and address. Some LSPs also require an authentication token.

### `[liquidity.lsps2_service]`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning this also requires compilation with the experimental feature enabled.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I was planning/hoping to remove that flag so we can ship a single binary, dockerfile, etc but yeah will add that for now since we haven't done it yet.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, IMO we should only drop that flag once we refactored the interface to something that is more usable in actual production, not just as a PoC.

Comment threaddocs/configuration.md Outdated
Comment threaddocs/getting-started.md
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md Outdated
Comment threaddocs/operations.md
|----------------------------------------|--------------|----------------------------------------------------------------------------|
| `<storage_dir>/keys_seed` | **Critical** | Node identity and master secret. Required to recover on-chain funds. |
| `<network_dir>/ldk_node_data.sqlite` | **Critical** | Channel state and on-chain wallet data. Required to recover channel funds. |
| `<network_dir>/ldk_server_data.sqlite` | Nice-to-have | Payment and forwarding history |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, should we even document this to begin with?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

This should all be in the ldk-node db eventually so we should be able to remove it. In the meantime I'd rather document it so people know what the 2 dbs are. I wouldn't want someone to mess with ldk_node_data thinking they don't need it because they're running ldk-server, not ldk-node

Comment threaddocs/tor.md
To make your node reachable as a Tor hidden service, you need to configure Tor itself. LDK
Server does not manage this automatically.

### 1. Configure the Hidden Service

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm, did you test this, does the hidden service setup really work right now?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I tested mine, can connect to me if you want :) 0329febe813633207345f016d06d1e2b07f7b977ae7b34cda67d026769d7beb0b2@abz6grablzwec2afhng5vxtrbeioc2bczlbeeqnf57anl2lcjean3aad.onion:9735

Comment threaddocs/tor.md
```

This requires a running Tor daemon with a SOCKS port. Only connections to `.onion` peers use
the proxy. Connections to IPv4/IPv6 peers, Electrum servers, and Esplora endpoints are **not**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems the Tor bypass of Electrum servers etc. derserves a big Warning sign. I'm honestly even hesitant to advertise Tor support in such a general way until we're sure we're not leaking any connections.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'd like to include a doc for it because I know people will ask for it. I agree on the warning sign, will add. However, ideally people aren't using electrum with ldk-server and are using a proper bitcoind node so there wouldn't be leaks anyways.

@AnyitechsAnyitechs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, thank you!

Comment threaddocs/api-guide.md

| RPC | Description |
|---------------------------|------------------------------------------------------|
| `ExportPathfindingScores` | Export the router's pathfinding score cache |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also want to add that we support "importing" scorer files via set_pathfinding_scores_source?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

We mention it briefly in the configuration.md. I didn't want to highlight individual config options too much because that can quickly become out of date and we just give descriptions about the overall sections

Comment threaddocs/operations.md Outdated
Add docs/ directory with guides for getting started, configuration,
the gRPC API, Tor setup, and production operations. Add per-crate
READMEs for ldk-server-client, ldk-server-grpc, and ldk-server-cli.
Include READMEs in lib.rs via doc = include_str! so rustdoc validates
the code examples. Update the root README to link to the new docs and
fix outdated REST/port references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@tnulltnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feel free to land, can still iterate furhter.

Comment threaddocs/api-guide.md

The `grpc-message` trailer contains a human-readable error description.

## Endpoint Reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given you're comment over on #188, how is this different/less annoying to maintain over time?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah might be better to remove both

@tnull

Copy link
Copy Markdown
Collaborator

Actually just landing this, can continue the discussion still.

@tnull
tnull merged commit 04c2bf6 into lightningdevkit:mainApr 16, 2026
10 checks passed
@benthecarmanbenthecarman self-assigned this Apr 16, 2026
@benthecarman
benthecarman deleted the docs branch April 16, 2026 17:54
rsafier pushed a commit to rsafier/ldk-server that referenced this pull request Apr 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@benthecarman@ldk-reviews-bot@tnull@Anyitechs