]> 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, 23 Jan 2024 19:55:39 +0000 (19:55 +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
lightning/src/offers/merkle.rs

index 48dcfd9f57e9a8446d4db6810c7da1682dcb217c..c462e1ff7c367caecf4116a460c1fb3463348bed 100644 (file)
@@ -424,7 +424,7 @@ impl UnsignedBolt12Invoice {
        /// Note: The hash computation may have included unknown, odd TLV records.
        ///
        /// This is not exported to bindings users as functions aren't currently mapped.
-       pub fn sign<F, E>(mut self, sign: F) -> Result<Bolt12Invoice, SignError<E>>
+       pub(crate) fn sign<F, E>(mut self, sign: F) -> Result<Bolt12Invoice, SignError<E>>
        where
                F: FnOnce(&Self) -> Result<Signature, E>
        {
index 4dd85b352f708de598c60c89e91a3b1896ec81a4..80770ccf23327f2ea63fb67bb30c99cf1dbfde7e 100644 (file)
@@ -395,7 +395,7 @@ impl UnsignedInvoiceRequest {
        /// Note: The hash computation may have included unknown, odd TLV records.
        ///
        /// This is not exported to bindings users as functions are not yet mapped.
-       pub fn sign<F, E>(mut self, sign: F) -> Result<InvoiceRequest, SignError<E>>
+       pub(crate) fn sign<F, E>(mut self, sign: F) -> Result<InvoiceRequest, SignError<E>>
        where
                F: FnOnce(&Self) -> Result<Signature, E>
        {
index ced3b08b7c2f3a33becd7b2e4f2a444f909a66c9..0c5441cf5f5ae5ca2c7be98cc587f922ef245fed 100644 (file)
@@ -76,7 +76,7 @@ impl AsRef<TaggedHash> for TaggedHash {
 
 /// Error when signing messages.
 #[derive(Debug, PartialEq)]
-pub enum SignError<E> {
+pub(crate) enum SignError<E> {
        /// User-defined error when signing the message.
        Signing(E),
        /// Error when verifying the produced signature using the given pubkey.