]> git.bitcoin.ninja Git - rust-lightning/commit
Offer message interface and data format
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 9 Aug 2022 22:24:10 +0000 (17:24 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 4 Nov 2022 20:07:01 +0000 (15:07 -0500)
commit24b63de10c6b951263e7d262e739c55e01e650b3
tree8d7b7ff4a5d9434ca77616ee1c332b4fbd981398
parent48bb9edba1cd4f6c876bb35f82b374f20502abfb
Offer message interface and data format

Define an interface for BOLT 12 `offer` messages. The underlying format
consists of the original bytes and the parsed contents.

The bytes are later needed when constructing an `invoice_request`
message. This is because it must mirror all the `offer` TLV records,
including unknown ones, which aren't represented in the contents.

The contents will be used in `invoice_request` messages to avoid
duplication. Some fields while required in a typical user-pays-merchant
flow may not be necessary in the merchant-pays-user flow (i.e., refund).
lightning/src/lib.rs
lightning/src/offers/mod.rs [new file with mode: 0644]
lightning/src/offers/offer.rs [new file with mode: 0644]
lightning/src/onion_message/blinded_route.rs
lightning/src/onion_message/mod.rs
lightning/src/util/ser.rs