Skip to content

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

Merged
pwltr merged 4 commits intomainfrom
feat/probe-events
Apr 29, 2026
Merged

feat: add ProbeHandle and probe success/failure events#77
pwltr merged 4 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?

@ovitrif
Copy link
Copy Markdown
Collaborator

ovitrif commented Apr 9, 2026

Currently creating bindings... Otherwise ready for review.

Should we aim to upstream this or not necessary?

It's a bit too much not in our hands, sorry for the late answer.
So I'd keep us focused on our side instead of pursuing this directly; just like we did so far.

You're definitely always encouraged to double-check with Spiral, see what they have to say about it as well 🙏🏻

Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

reviewed and found main issue the missing version bump before regenerating the bindings and missing release; all fixed in:

Once that one is merged in here, this one can be merged too.

@pwltr pwltr merged commit e2fce94 into main Apr 29, 2026
1 check failed
@pwltr pwltr deleted the feat/probe-events branch April 29, 2026 08:25
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