Merge pull request #2162 from jkczyz/2023-04-invoice-hash
authorWilmer Paulino <9447167+wpaulino@users.noreply.github.com>
Fri, 7 Apr 2023 17:11:36 +0000 (10:11 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2023 17:11:36 +0000 (10:11 -0700)
1  2 
lightning-invoice/src/lib.rs

index 593701cab458c85079dff3e135dcebbf63845277,523777455cf074c245384a9e0f996f2fec6933ec..9ff22b8a3c316a3371149d8873e89f528e2f634b
@@@ -212,11 -214,11 +214,11 @@@ pub const DEFAULT_MIN_FINAL_CLTV_EXPIRY
  /// # Type parameters
  /// The two parameters `D` and `H` signal if the builder already contains the correct amount of the
  /// given field:
- ///  * `D`: exactly one `Description` or `DescriptionHash`
- ///  * `H`: exactly one `PaymentHash`
+ ///  * `D`: exactly one [`TaggedField::Description`] or [`TaggedField::DescriptionHash`]
+ ///  * `H`: exactly one [`TaggedField::PaymentHash`]
  ///  * `T`: the timestamp is set
  ///
 -/// (C-not exported) as we likely need to manually select one set of boolean type parameters.
 +/// This is not exported to bindings users as we likely need to manually select one set of boolean type parameters.
  #[derive(Eq, PartialEq, Debug, Clone)]
  pub struct InvoiceBuilder<D: tb::Bool, H: tb::Bool, T: tb::Bool, C: tb::Bool, S: tb::Bool> {
        currency: Currency,
@@@ -295,9 -299,9 +299,9 @@@ pub struct RawInvoice 
        pub data: RawDataPart,
  }
  
- /// Data of the `RawInvoice` that is encoded in the human readable part
+ /// Data of the [`RawInvoice`] that is encoded in the human readable part.
  ///
 -/// (C-not exported) As we don't yet support `Option<Enum>`
 +/// This is not exported to bindings users as we don't yet support `Option<Enum>`
  #[derive(Eq, PartialEq, Debug, Clone, Hash)]
  pub struct RawHrp {
        /// The currency deferred from the 3rd and 4th character of the bech32 transaction
@@@ -881,11 -874,11 +886,11 @@@ impl RawInvoice 
                )
        }
  
-       /// Signs the invoice using the supplied `sign_function`. This function MAY fail with an error
-       /// of type `E`. Since the signature of a `SignedRawInvoice` is not required to be valid there
+       /// Signs the invoice using the supplied `sign_method`. This function MAY fail with an error of
+       /// type `E`. Since the signature of a [`SignedRawInvoice`] is not required to be valid there
        /// are no constraints regarding the validity of the produced signature.
        ///
 -      /// (C-not exported) As we don't currently support passing function pointers into methods
 +      /// This is not exported to bindings users as we don't currently support passing function pointers into methods
        /// explicitly.
        pub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawInvoice, E>
                where F: FnOnce(&Message) -> Result<RecoverableSignature, E>