X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Foffers%2Finvoice.rs;fp=lightning%2Fsrc%2Foffers%2Finvoice.rs;h=7a3438b6410f8ff73fe7fd5f47bc28479aef1d39;hb=e049e97993b292337e32864f47fa0a445d37e047;hp=d1b1e99bad381b32ace7aa9c86d974e86fb79bf8;hpb=9a657092396de98aa220149a5fbfd8dbded8512a;p=rust-lightning diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index d1b1e99b..7a3438b6 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -267,6 +267,11 @@ pub struct UnsignedInvoice<'a> { } impl<'a> UnsignedInvoice<'a> { + /// The public key corresponding to the key needed to sign the invoice. + pub fn signing_pubkey(&self) -> PublicKey { + self.invoice.fields().signing_pubkey + } + /// Signs the invoice using the given function. pub fn sign(self, sign: F) -> Result> where @@ -453,12 +458,12 @@ impl Invoice { &self.contents.fields().features } - /// The public key used to sign invoices. + /// The public key corresponding to the key used to sign the invoice. pub fn signing_pubkey(&self) -> PublicKey { self.contents.fields().signing_pubkey } - /// Signature of the invoice using [`Invoice::signing_pubkey`]. + /// Signature of the invoice verified using [`Invoice::signing_pubkey`]. pub fn signature(&self) -> Signature { self.signature }