Merge pull request #2139 from TheBlueMatt/2023-03-metadata-prefactors
[rust-lightning] / lightning / src / offers / payer.rs
index 1705be85ed8f53bb316154f81edacbd9f2f391ab..7e1da769edab6cec527c4de425bb7711fc50fa1f 100644 (file)
@@ -9,11 +9,17 @@
 
 //! Data structures and encoding for `invoice_request_metadata` records.
 
+use crate::util::ser::WithoutLength;
+
 use crate::prelude::*;
 
 /// An unpredictable sequence of bytes typically containing information needed to derive
 /// [`InvoiceRequest::payer_id`].
 ///
 /// [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
-#[derive(Clone, Debug)]
-pub(crate) struct PayerContents(pub Vec<u8>);
+#[derive(Clone, Debug, PartialEq)]
+pub(super) struct PayerContents(pub Vec<u8>);
+
+tlv_stream!(PayerTlvStream, PayerTlvStreamRef, 0..1, {
+       (0, metadata: (Vec<u8>, WithoutLength)),
+});