From: Matt Corallo Date: Wed, 1 May 2024 16:04:13 +0000 (+0000) Subject: Update documentation on `[u8; 32]` wrappers for clarity X-Git-Tag: v0.0.123-rc1~1^2~2^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=376df8770b43caaefaa7caaac85a2289103ed964;p=rust-lightning Update documentation on `[u8; 32]` wrappers for clarity --- diff --git a/lightning/src/ln/types.rs b/lightning/src/ln/types.rs index d3eb20479..14774fb5e 100644 --- a/lightning/src/ln/types.rs +++ b/lightning/src/ln/types.rs @@ -124,7 +124,8 @@ impl fmt::Display for ChannelId { } -/// payment_hash type, use to cross-lock hop +/// The payment hash is the hash of the [`PaymentPreimage`] which is the value used to lock funds +/// in HTLCs while they transit the lightning network. /// /// This is not exported to bindings users as we just use [u8; 32] directly #[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)] @@ -136,7 +137,8 @@ impl core::fmt::Display for PaymentHash { } } -/// payment_preimage type, use to route payment between hop +/// The payment preimage is the "secret key" which is used to claim the funds of an HTLC on-chain +/// or in a lightning channel. /// /// This is not exported to bindings users as we just use [u8; 32] directly #[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)] @@ -155,7 +157,8 @@ impl From for PaymentHash { } } -/// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together +/// The payment secret is used to authenticate the sender of an HTLC to the recipient and tie +/// multi-part HTLCs together into a single payment. /// /// This is not exported to bindings users as we just use [u8; 32] directly #[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]