]> git.bitcoin.ninja Git - rust-lightning/commitdiff
`crate`-only several BOLT12 methods that require unbounded generics
authorMatt Corallo <git@bluematt.me>
Thu, 28 Sep 2023 03:03:38 +0000 (03:03 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 14 May 2024 20:46:40 +0000 (20:46 +0000)
These are not expressible in C/most languages, and thus must be
hidden.

lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs

index 2c0d3420474724cb9d1648b5b5c66e607820a754..94c0439faa588651a2024b3bcfcd165b50a7696d 100644 (file)
@@ -561,7 +561,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<F: SignBolt12InvoiceFn>(
+       ///
+       /// This is not exported to bindings users as functions aren't currently mapped.
+       pub(crate) fn sign<F: SignBolt12InvoiceFn>(
                $($self_mut)* $self: $self_type, sign: F
        ) -> Result<Bolt12Invoice, SignError> {
                let pubkey = $self.contents.fields().signing_pubkey;
index 9041fa8a9bf422ec75f4ba273be80a7bc815c1e6..14c1786614bc2f802e7c37f0be005f3cda76d675 100644 (file)
@@ -547,7 +547,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<F: SignInvoiceRequestFn>(
+       ///
+       /// This is not exported to bindings users as functions are not yet mapped.
+       pub(crate) fn sign<F: SignInvoiceRequestFn>(
                $($self_mut)* $self: $self_type, sign: F
        ) -> Result<InvoiceRequest, SignError> {
                let pubkey = $self.contents.payer_id;