Skip to content

Commit da41691

Browse files
committed
f - document sign_message
1 parent 2ee716b commit da41691

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/offers/merkle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ tlv_stream!(SignatureTlvStream, SignatureTlvStreamRef, SIGNATURE_TYPES, {
2424
(240, signature: Signature),
2525
});
2626

27+
/// Signs a message digest consisting of a tagged hash of the given bytes, checking if it can be
28+
/// verified with the supplied pubkey.
29+
///
30+
/// Assumes `bytes` is a well-formed TLV stream containing at least one TLV record.
2731
pub(super) fn sign_message<F>(
2832
sign: F, tag: &str, bytes: &[u8], pubkey: PublicKey,
2933
) -> Result<Signature, secp256k1::Error>

0 commit comments

Comments
 (0)