Skip to content

feat: add ProbeHandle and probe success/failure events#77

Open
pwltr wants to merge 3 commits intomainfrom
feat/probe-events
Open

feat: add ProbeHandle and probe success/failure events#77
pwltr wants to merge 3 commits intomainfrom
feat/probe-events

Conversation

@pwltr
Copy link
Copy Markdown

@pwltr pwltr commented Apr 8, 2026

Description

This PR exposes the probe lifecycle end-to-end, allowing consumer apps (Bitkit) to actually use the result of a probe.

The node’s event queue now surfaces Event::ProbeSuccessful and Event::ProbeFailed (mapped from LDK’s probe events), and send_probes / send_probes_using_amount (BOLT11) plus send_probes (spontaneous) return a ProbeHandle per path with the same payment_id and synthetic payment_hash, so apps can match handles to those events reliably.

UniFFI exposes ProbeHandle as a dictionary in ldk_node.udl, following the same pattern as other records (hand-written Rust struct + pub use before include_scaffolding!). Swift bindings are updated accordingly.

How to use (consumer): keep a map of pending probes keyed by payment_id from the returned handles; on ProbeSuccessful / ProbeFailed, match payment_id (and optionally payment_hash) and remove the entry.

@pwltr pwltr marked this pull request as ready for review April 8, 2026 17:35
@pwltr pwltr requested review from ben-kaufman and ovitrif April 8, 2026 17:35
@pwltr
Copy link
Copy Markdown
Author

pwltr commented Apr 8, 2026

Currently creating bindings... Otherwise ready for review.

Should we aim to upstream this or not necessary?

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