Skip to content

Add runtime Esplora header providers - #1218

Draft
elnafateh wants to merge 1 commit into
lightningdevkit:mainfrom
elnafateh:feat/esplora-dynamic-header-provider
Draft

elnafateh wants to merge 1 commit into
lightningdevkit:mainfrom
elnafateh:feat/esplora-dynamic-header-provider

Conversation

@elnafateh

@elnafateh elnafateh commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1070

Summary

  • Add a shared async EsploraHeaderProvider and an additive builder method for runtime headers.
  • Use the same provider for BDK wallet sync and LDK transaction sync; each client requests headers for outgoing Esplora requests.
  • Preserve the existing fixed-header API and behavior.
  • Surface provider failures as request errors without falling back to stale headers.

Design notes

The two client paths use different esplora-client versions, so this vendors and patches both versions with a per-request provider hook. UniFFI 0.29 cannot export async foreign callback traits; its provider callback is synchronous and should return the application's current cached headers promptly.

The builder's custom Debug implementation also redacts the Bitcoin Core RPC password.

OpenAI Codex assisted with implementation and validation.

@ldk-reviews-bot

Copy link
Copy Markdown

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@elnafateh elnafateh closed this Nov 3, 2026
@elnafateh elnafateh reopened this Nov 3, 2026
@randomlogin

Copy link
Copy Markdown
Contributor

I think supplying dependencies to /vendor to circumvent the normal Rust package dependency is unwanted, as it make maintenance a lot more difficult.

Maybe there is another solution? Or the needed change can be done upstream?

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.

Support oauth for esplora backends

3 participants