-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make blinded path public #3677
make blinded path public #3677
Conversation
I've assigned @wpaulino as a reviewer! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3677 +/- ##
==========================================
+ Coverage 89.25% 89.94% +0.69%
==========================================
Files 155 155
Lines 119954 124186 +4232
Branches 119954 124186 +4232
==========================================
+ Hits 107064 111703 +4639
+ Misses 10277 9908 -369
+ Partials 2613 2575 -38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔔 1st Reminder Hey @wpaulino! This PR has been waiting for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be enough for your use case to expose BlindedMessagePath::from_raw
instead? It's currently test-only.
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
1dc18c2
to
9c10693
Compare
Yes, that will work. Updated the PR to expose that. |
Great! CI is failing since we need docs on all public APIs. Maybe also rename |
9c10693
to
307b197
Compare
I like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The changes look great.
The CI is failing because there's still one instance of from_raw
usage that hasn't been updated in this PR:
This adds the option to initialize a `BlindedMessagePath` from its constituent parts. Useful when you need to reconstruct a blinded path from previously serialized components. The `from_blinded_path` function is made public.
307b197
to
8ce438c
Compare
Ah, my editor didn't catch that. Updated again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-merge ACK
What do I want: Create custom responses to onion messages in a core lightning plugin. The core lightning hook provides all the fields necessary to fill the blinded path. All I need is the
BlindedPath
struct to be publicly accessible.Usage example here: https://github.com/michael1011/bolt12-client/blob/730c27d259b9da689ea41f8cd5ce5338ce9927ab/src/bolt12.rs#L136-L156