Expose signable hashes for BOLT 11 and BOLT 12 invoices#2162
Merged
wpaulino merged 3 commits intolightningdevkit:mainfrom Apr 7, 2023
Merged
Expose signable hashes for BOLT 11 and BOLT 12 invoices#2162wpaulino merged 3 commits intolightningdevkit:mainfrom
wpaulino merged 3 commits intolightningdevkit:mainfrom
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #2162 +/- ##
==========================================
+ Coverage 91.33% 92.36% +1.03%
==========================================
Files 101 103 +2
Lines 48837 64849 +16012
Branches 48837 64849 +16012
==========================================
+ Hits 44604 59901 +15297
- Misses 4233 4948 +715
... and 49 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
TheBlueMatt
previously approved these changes
Apr 6, 2023
lightning-invoice/src/lib.rs
Outdated
| } | ||
|
|
||
| impl Invoice { | ||
| /// The hash of the `RawInvoice` that was signed. |
Contributor
Author
There was a problem hiding this comment.
Linkified all the the things!
wpaulino
previously approved these changes
Apr 7, 2023
Otherwise, an Invoice must first be converted to a SignedRawInvoice to obtain the hash.
This is useful as an identifier for downstream clients like VLS.
e7b1774 to
39befa1
Compare
TheBlueMatt
approved these changes
Apr 7, 2023
wpaulino
approved these changes
Apr 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are useful for downstream clients needing an invoice identifier. The BOLT 11 invoice hash is already accessible but requires consuming or cloning the invoice first. For BOLT 12, the hash is only used when calculating or verifying a signature, so it is recomputed for simplicity.