X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Foffer.rs;h=253de8652bbdb8bbe70792988fa676a9b52bcbc6;hb=3ccf06416091e107f443ee92027501105c48054b;hp=db910b5e1bba361d977448bd6bd53a706cd92cab;hpb=2701bc512ad0d73a3309bf87a6b2487b2bfe00bf;p=rust-lightning diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index db910b5e..253de865 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -664,6 +664,13 @@ impl Offer { pub fn expects_quantity(&self) -> bool { self.contents.expects_quantity() } + + #[cfg(async_payments)] + pub(super) fn verify( + &self, key: &ExpandedKey, secp_ctx: &Secp256k1 + ) -> Result<(OfferId, Option), ()> { + self.contents.verify(&self.bytes, key, secp_ctx) + } } macro_rules! request_invoice_derived_payer_id { ($self: ident, $builder: ty) => {