-
Notifications
You must be signed in to change notification settings - Fork 414
offer: make the merkle tree signature public #3892
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
base: main
Are you sure you want to change the base?
offer: make the merkle tree signature public #3892
Conversation
I've assigned @valentinewallace as a reviewer! |
This is helpfull for the users that want to use the merkle tree signature in their own code, for example to verify the signature of bolt12 invoices or recreate it. Very useful for people that are building command line tools for the bolt12 offers. Signed-off-by: Vincenzo Palazzo <[email protected]>
0ffed61
to
be23002
Compare
I'm not personally opposed to this and it may be nice to expose it for the use cases you mention. I'm also not sure about any API guarantees for these methods. I don't think it's too much of a hassle to treat them the same way we treat any other public API. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3892 +/- ##
==========================================
- Coverage 89.66% 89.62% -0.05%
==========================================
Files 164 164
Lines 134661 134661
Branches 134661 134661
==========================================
- Hits 120743 120684 -59
- Misses 11237 11286 +49
- Partials 2681 2691 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -41,7 +41,7 @@ impl TaggedHash { | |||
/// Creates a tagged hash with the given parameters. | |||
/// | |||
/// Panics if `bytes` is not a well-formed TLV stream containing at least one TLV record. | |||
pub(super) fn from_valid_tlv_stream_bytes(tag: &'static str, bytes: &[u8]) -> Self { | |||
pub fn from_valid_tlv_stream_bytes(tag: &'static str, bytes: &[u8]) -> Self { |
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.
Do we have a user for this? Feels pretty low-level to be exposing. Echo dunxen's sentiments about improving the docs if we do want to expose it.
👋 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. |
This is helpful for users who want to use the Merkle tree signature in their own code, for example, to verify the signature of bolt12 invoices or recreate it.
Very useful for people who are building command line tools for the bolt12 offers.
I am opening this, but I do not know if it is something that you want to do, but at the same time, IMHO, this is very useful to expose because it allows to use LDK in command line tools and in learning tools.
However, this is not strictly necessary because
Bolt12Invoice::try_from
already verifies the signature, but I would open this to know your point of view.