Skip to content

Commit 4ae7bdb

Browse files
committed
crate-only several BOLT12 methods that require unbounded generics
These are not expressible in C/most languages, and thus must be hidden.
1 parent 51d0ef6 commit 4ae7bdb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lightning/src/offers/invoice.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! The payment recipient must include a [`PaymentHash`], so as to reveal the preimage upon payment
1717
//! receipt, and one or more [`BlindedPaymentPath`]s for the payer to use when sending the payment.
1818
//!
19-
//! ```
19+
//! ```ignore
2020
//! extern crate bitcoin;
2121
//! extern crate lightning;
2222
//!
@@ -280,8 +280,7 @@ macro_rules! invoice_explicit_signing_pubkey_builder_methods {
280280
Self::new(&refund.bytes, contents, ExplicitSigningPubkey {})
281281
}
282282

283-
/// Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
284-
/// [`UnsignedBolt12Invoice::sign`].
283+
/// Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics.
285284
pub fn build($self: $self_type) -> Result<UnsignedBolt12Invoice, Bolt12SemanticError> {
286285
#[cfg(feature = "std")]
287286
{
@@ -671,7 +670,9 @@ macro_rules! unsigned_invoice_sign_method { ($self: ident, $self_type: ty $(, $s
671670
/// Signs the [`TaggedHash`] of the invoice using the given function.
672671
///
673672
/// Note: The hash computation may have included unknown, odd TLV records.
674-
pub fn sign<F: SignBolt12InvoiceFn>(
673+
///
674+
/// This is not exported to bindings users as functions aren't currently mapped.
675+
pub(crate) fn sign<F: SignBolt12InvoiceFn>(
675676
$($self_mut)* $self: $self_type, sign: F
676677
) -> Result<Bolt12Invoice, SignError> {
677678
let pubkey = $self.contents.fields().signing_pubkey;

lightning/src/offers/invoice_request.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ macro_rules! unsigned_invoice_request_sign_method { (
528528
/// Signs the [`TaggedHash`] of the invoice request using the given function.
529529
///
530530
/// Note: The hash computation may have included unknown, odd TLV records.
531-
pub fn sign<F: SignInvoiceRequestFn>(
531+
///
532+
/// This is not exported to bindings users as functions are not yet mapped.
533+
pub(crate) fn sign<F: SignInvoiceRequestFn>(
532534
$($self_mut)* $self: $self_type, sign: F
533535
) -> Result<InvoiceRequest, SignError> {
534536
let pubkey = $self.contents.payer_signing_pubkey;

lightning/src/sign/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,9 +957,6 @@ pub trait NodeSigner {
957957

958958
/// Signs the [`TaggedHash`] of a BOLT 12 invoice.
959959
///
960-
/// May be called by a function passed to [`UnsignedBolt12Invoice::sign`] where `invoice` is the
961-
/// callee.
962-
///
963960
/// Implementors may check that the `invoice` is expected rather than blindly signing the tagged
964961
/// hash. An `Ok` result should sign `invoice.tagged_hash().as_digest()` with the node's signing
965962
/// key or an ephemeral key to preserve privacy, whichever is associated with

0 commit comments

Comments
 (0)