Skip to content

Commit

Permalink
crate-only several BOLT12 methods that require unbounded generics
Browse files Browse the repository at this point in the history
These are not expressible in C/most languages, and thus must be
hidden.
  • Loading branch information
TheBlueMatt committed Jan 23, 2024
1 parent bc7a7ee commit 0c76767
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lightning/src/offers/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{
Expand Down
2 changes: 1 addition & 1 deletion lightning/src/offers/invoice_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{
Expand Down
2 changes: 1 addition & 1 deletion lightning/src/offers/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0c76767

Please sign in to comment.