From: Matt Corallo Date: Thu, 28 Sep 2023 03:03:38 +0000 (+0000) Subject: `crate`-only several BOLT12 methods that require unbounded generics X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=e55b8e4d5bc678382ec0b9b4777879e3302908ed;p=rust-lightning `crate`-only several BOLT12 methods that require unbounded generics These are not expressible in C/most languages, and thus must be hidden. --- diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index 865939b07..9e0fa2d4b 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -516,7 +516,9 @@ macro_rules! unsigned_invoice_sign_method { ($self: ident, $self_type: ty $(, $s /// Signs the [`TaggedHash`] of the invoice using the given function. /// /// Note: The hash computation may have included unknown, odd TLV records. - pub fn sign( + /// + /// This is not exported to bindings users as functions aren't currently mapped. + pub(crate) fn sign( $($self_mut)* $self: $self_type, sign: F ) -> Result { let pubkey = $self.contents.fields().signing_pubkey; diff --git a/lightning/src/offers/invoice_request.rs b/lightning/src/offers/invoice_request.rs index fa3d9161b..62cf5653f 100644 --- a/lightning/src/offers/invoice_request.rs +++ b/lightning/src/offers/invoice_request.rs @@ -545,7 +545,9 @@ macro_rules! unsigned_invoice_request_sign_method { ( /// Signs the [`TaggedHash`] of the invoice request using the given function. /// /// Note: The hash computation may have included unknown, odd TLV records. - pub fn sign( + /// + /// This is not exported to bindings users as functions are not yet mapped. + pub(crate) fn sign( $($self_mut)* $self: $self_type, sign: F ) -> Result { let pubkey = $self.contents.payer_id;