]> git.bitcoin.ninja Git - rust-lightning/blob - lightning/src/offers/payer.rs
Merge pull request #1908 from jkczyz/2022-11-refund
[rust-lightning] / lightning / src / offers / payer.rs
1 // This file is Copyright its original authors, visible in version control
2 // history.
3 //
4 // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
5 // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
7 // You may not use this file except in accordance with one or both of these
8 // licenses.
9
10 //! Data structures and encoding for `invoice_request_metadata` records.
11
12 use crate::util::ser::WithoutLength;
13
14 use crate::prelude::*;
15
16 /// An unpredictable sequence of bytes typically containing information needed to derive
17 /// [`InvoiceRequest::payer_id`].
18 ///
19 /// [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
20 #[derive(Clone, Debug)]
21 pub(super) struct PayerContents(pub Vec<u8>);
22
23 tlv_stream!(PayerTlvStream, PayerTlvStreamRef, 0..1, {
24         (0, metadata: (Vec<u8>, WithoutLength)),
25 });