Skip to content

Commit 2bf737c

Browse files
committed
Require the high-level sign traits instead of SignFn in bindings
Methods like `StaticInvoice::sign` have their own signing-function traits, so there's no actual need to use `SignFn` directly, its just a useful generic wrapper. Sadly, because it uses `AsRef` bounds, which aren't really practical to map in bindings, we can't really expose it directly in bindings. Because there's an alternative and its tricky to expose, we simply mark it no-export here.
1 parent 7fb0f2a commit 2bf737c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/offers/merkle.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ pub enum SignError {
9494
}
9595

9696
/// A function for signing a [`TaggedHash`].
97+
///
98+
/// This is not exported to bindings users as signing functions should just be used per-signed-type
99+
/// instead.
97100
pub trait SignFn<T: AsRef<TaggedHash>> {
98101
/// Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
99102
fn sign(&self, message: &T) -> Result<Signature, ()>;

0 commit comments

Comments
 (0)