Add test of an initial message other than `Init`
[rust-lightning] / lightning / src / offers / parse.rs
index b462e686910a2ed9d26f44c74c75cec3f00b5187..35c1425acc13b86316858065afb1ed15a7a6402e 100644 (file)
@@ -147,6 +147,8 @@ pub enum SemanticError {
        MissingDescription,
        /// A signing pubkey was not provided.
        MissingSigningPubkey,
+       /// A signing pubkey was provided but a different one was expected.
+       InvalidSigningPubkey,
        /// A signing pubkey was provided but was not expected.
        UnexpectedSigningPubkey,
        /// A quantity was expected but was missing.
@@ -155,10 +157,22 @@ pub enum SemanticError {
        InvalidQuantity,
        /// A quantity or quantity bounds was provided but was not expected.
        UnexpectedQuantity,
+       /// Metadata was provided but was not expected.
+       UnexpectedMetadata,
        /// Payer metadata was expected but was missing.
        MissingPayerMetadata,
        /// A payer id was expected but was missing.
        MissingPayerId,
+       /// Blinded paths were expected but were missing.
+       MissingPaths,
+       /// The blinded payinfo given does not match the number of blinded path hops.
+       InvalidPayInfo,
+       /// An invoice creation time was expected but was missing.
+       MissingCreationTime,
+       /// An invoice payment hash was expected but was missing.
+       MissingPaymentHash,
+       /// A signature was expected but was missing.
+       MissingSignature,
 }
 
 impl From<bech32::Error> for ParseError {