Merge pull request #2120 from valentinewallace/2023-03-blinded-pathfinding
[rust-lightning] / lightning / src / offers / parse.rs
index 6afd4d68fef385bb5b6b77b8375891e53878f6e7..42ed2e002d1f29b60169c86954f39cece3101647 100644 (file)
@@ -116,6 +116,8 @@ impl<T: SeekReadable> TryFrom<Vec<u8>> for ParsedMessage<T> {
 }
 
 /// Error when parsing a bech32 encoded message using [`str::parse`].
+///
+/// This is not exported to bindings users as its name conflicts with the BOLT 11 ParseError type.
 #[derive(Debug, PartialEq)]
 pub enum ParseError {
        /// The bech32 encoding does not conform to the BOLT 12 requirements for continuing messages
@@ -135,6 +137,8 @@ pub enum ParseError {
 }
 
 /// Error when interpreting a TLV stream as a specific type.
+///
+/// This is not exported to bindings users as its name conflicts with the BOLT 11 SemanticError type.
 #[derive(Debug, PartialEq)]
 pub enum SemanticError {
        /// The current [`std::time::SystemTime`] is past the offer or invoice's expiration.
@@ -171,6 +175,8 @@ pub enum SemanticError {
        InvalidQuantity,
        /// A quantity or quantity bounds was provided but was not expected.
        UnexpectedQuantity,
+       /// Metadata could not be used to verify the offers message.
+       InvalidMetadata,
        /// Metadata was provided but was not expected.
        UnexpectedMetadata,
        /// Payer metadata was expected but was missing.