]> 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>
Mon, 26 Sep 2022 18:49:54 +0000 (13:49 -0500)
commit98e6efc8893a0df809d65b95ec959180bb568f4b
tree6f981c302eaf4c8a761613d40a5589caf21eb08b
parent993e86163636fe1e4da378441130c6caac1bc4d5
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