]> 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, 3 Sep 2024 14:00:23 +0000 (14:00 +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 865939b078e0d317f7559eb9f0f3182d3cc48ed1..9e0fa2d4b376e8c809657814ba4dc677c42cee12 100644 (file)
@@ -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<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 fa3d9161b8221567a694c4792632f4e3fb8df63b..62cf5653ff7b773281b2b75020b563b5f63ab16e 100644 (file)
@@ -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<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;