Skip to content

Expose missing uniffi APIs - #1249

Open
tnull wants to merge 5 commits into
lightningdevkit:mainfrom
tnull:2026-11-expose-missing-uniffi-apis
Open

tnull wants to merge 5 commits into
lightningdevkit:mainfrom
tnull:2026-11-expose-missing-uniffi-apis

Conversation

@tnull

@tnull tnull commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

We just expose some APIs that we so far missed to expose via uniffi.

`Builder::set_chain_source_esplora_with_headers` was only available
to Rust users, so bindings users had no way to authenticate against
an Esplora server that requires custom request headers.

Export the method via UniFFI alongside the plain Esplora setter, as
all of its arguments are already representable in the bindings.

Co-Authored-By: HAL 9000
`Builder::enable_liquidity_provider` was only available to Rust
users, even though `LSPS2ServiceConfig` is already a UniFFI record.
Bindings users could therefore construct the service configuration
but had no way to hand it to the builder.

Export the method via UniFFI next to the other liquidity setter.

Co-Authored-By: HAL 9000
`aggregate_channel_pair_stats` was only available to Rust users, so
bindings users could list channel-pair forwarding buckets but had to
reimplement the aggregation into cumulative totals themselves.

Export it as a free function via UniFFI.

Co-Authored-By: HAL 9000
`Node::prober` and `Prober::locked_msat` were only available to Rust
users, so bindings users could configure background probing but had
no way to observe how much liquidity is locked in in-flight probes.

Make `Prober` a UniFFI object and export `locked_msat`. As bindings
can't hold a borrowed reference, `Node::prober` hands out a shared
handle when building with UniFFI.

Co-Authored-By: HAL 9000
The bindings' `NodeAnnouncementInfo` dropped the announced feature
bits and the node color when converting from LDK's type, so bindings
users querying the network graph saw less than Rust users do.

Carry both fields over, reusing the existing `NodeFeatures` object
for the feature bits and passing the color as its three raw bytes.

Co-Authored-By: HAL 9000
@tnull
tnull requested a review from tankyleo November 19, 2026 10:17
@ldk-reviews-bot

ldk-reviews-bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👋 Thanks for assigning @tankyleo 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.

@tnull tnull added this to the 0.8 milestone Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants