Skip to content

refactor(lnd): expose shared client constructor - #16

Merged
tompro merged 1 commit into
masterfrom
feat/public-lnd-client-constructor
Sep 28, 2026
Merged

tompro merged 1 commit into
masterfrom
feat/public-lnd-client-constructor

Conversation

@tompro

@tompro tompro commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

Expose the existing payday_node_lnd::lnd::create_client constructor publicly so advanced RPC callers reuse Payday's connection/TLS policy instead of duplicating the three-way LndConfig match.

This is a requested cleanup for https://github.com/The-Bitcoin-Company/tbc-rust/pull/652, which will replace its duplicated constructor with this function.

  • Constructor body, TLS behavior, and dependencies are unchanged; visibility changes from pub(crate) to pub.
  • Document configuration/TLS semantics, caller-owned caching/timeouts, lazy reachability/authentication and required error sanitization.
  • Add an external doctest that type-checks the public future without polling it or performing network I/O.

Validation

Using the TBC Rust Nix shell:

  • cargo test --locked -p payday_node_lnd: 20 unit tests + 1 doctest passed.
  • All-target check and all-target/all-feature Clippy (-D warnings) for payday_node_lnd passed.
  • Dedicated doctests, changed-file rustfmt check, and git diff --check passed.
  • No live node/TLS tests. Constructor body was verified unchanged against the base commit.

@tompro
tompro merged commit e58670d into master Sep 28, 2026
1 check passed
@tompro
tompro deleted the feat/public-lnd-client-constructor branch September 28, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant