-
Notifications
You must be signed in to change notification settings - Fork 367
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
Experimental offer TLVs #3237
Experimental offer TLVs #3237
Commits on Oct 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bbdd873 - Browse repository at this point
Copy the full SHA bbdd873View commit details -
Add optional lifetime to tlv_stream macro
Using the tlv_stream macro without a type needing a reference results in a compilation error because of an unused lifetime parameter. To avoid this, add an optional lifetime parameter to the macro. This allows for experimental TLVs, which will be empty initially, and TLVs of entirely primitive types.
Configuration menu - View commit details
-
Copy full SHA for a773001 - Browse repository at this point
Copy the full SHA a773001View commit details -
Remove unneeded Eq and PartialEq derives
TlvRecord has a few fields, but comparing only the record_bytes is sufficient for equality since the other fields are initialized from it. Remove the Eq and PartialEq derives as they compare these other fields.
Configuration menu - View commit details
-
Copy full SHA for e23f89c - Browse repository at this point
Copy the full SHA e23f89cView commit details
Commits on Nov 5, 2024
-
Separate bytes for experimental TLVs
When constructing UnsignedInvoiceRequest or UnsignedBolt12Invoice, use a separate field for experimental TLV bytes. This allows for properly inserting the signature TLVs before the experimental TLVs when signing.
Configuration menu - View commit details
-
Copy full SHA for 771aa8e - Browse repository at this point
Copy the full SHA 771aa8eView commit details -
Function for iterating over Offer TLV records
Add a utility function for iterating over Offer TLV records contained in any valid TLV stream bytes. Using a common function ensures that experimental TLV records are included once they are supported.
Configuration menu - View commit details
-
Copy full SHA for 1eb5baa - Browse repository at this point
Copy the full SHA 1eb5baaView commit details -
Pass bytes instead of TlvStream to verify
Passing bytes directly to InvoiceContents::verify improves readability as then a TlvStream for each TLV record range can be created from the bytes instead of needing to clone the TlvStream upfront. In an upcoming commit, the experimental TLV record range will utilize this.
Configuration menu - View commit details
-
Copy full SHA for 63c687f - Browse repository at this point
Copy the full SHA 63c687fView commit details -
Include experimental TLV records when verifying
Upcoming commits will allow parsing BOLT12 messages that include TLV records in the experimental range. Include these ranges when verifying messages since they will be included in the message bytes.
Configuration menu - View commit details
-
Copy full SHA for bcc7c1d - Browse repository at this point
Copy the full SHA bcc7c1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 38e9457 - Browse repository at this point
Copy the full SHA 38e9457View commit details -
Parse experimental offer TLV records
The BOLT12 spec defines an experimental TLV range that are allowed in offer messages. Allow this range when parsing an offer and include those bytes in any invoice requests. Also include those bytes when computing an OfferId and verifying that an InvoiceRequest is for a valid Offer.
Configuration menu - View commit details
-
Copy full SHA for e01e731 - Browse repository at this point
Copy the full SHA e01e731View commit details -
Test verification with experimental offer TLVs
Offer metadata is generated from the offer TLVs and should included those in the experimental range. When verifying invoice request and invoice messages, these TLVs must be included. Similarly, OfferId construction should included these TLVs as well. Modify the BOLT12 verification tests to cover these TLVs.
Configuration menu - View commit details
-
Copy full SHA for 6a708e2 - Browse repository at this point
Copy the full SHA 6a708e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a728d1d - Browse repository at this point
Copy the full SHA a728d1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62cddb7 - Browse repository at this point
Copy the full SHA 62cddb7View commit details -
Parse experimental invreq TLV records
The BOLT12 spec defines an experimental TLV range that are allowed in invoice_request messages. Allow this range when parsing an invoice request and include those bytes in any invoice. Also include those bytes when verifying that a Bolt12Invoice is for a valid InvoiceRequest.
Configuration menu - View commit details
-
Copy full SHA for 5590bc2 - Browse repository at this point
Copy the full SHA 5590bc2View commit details -
Test verification with experimental invreq TLVs
Payer metadata is generated from the invreq TLVs and should included those in the experimental range. When verifying invoice messages, these TLVs must be included. Modify the BOLT12 verification tests to cover them.
Configuration menu - View commit details
-
Copy full SHA for e217c62 - Browse repository at this point
Copy the full SHA e217c62View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cf178f - Browse repository at this point
Copy the full SHA 9cf178fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 22d30e6 - Browse repository at this point
Copy the full SHA 22d30e6View commit details -
Parse experimental invoice TLV records
The BOLT12 spec defines an experimental TLV range that is allowed in offer and invoice_request messages. The remaining TLV-space is for experimental use in invoice messages. Allow this range when parsing an invoice and include it when signing one.
Configuration menu - View commit details
-
Copy full SHA for 8e279f7 - Browse repository at this point
Copy the full SHA 8e279f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7668240 - Browse repository at this point
Copy the full SHA 7668240View commit details -
Configuration menu - View commit details
-
Copy full SHA for 169b260 - Browse repository at this point
Copy the full SHA 169b260View commit details