Skip to content

Commit 4dab520

Browse files
committed
Update documentation on [u8; 32] wrappers for clarity
1 parent 3dec143 commit 4dab520

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lightning/src/ln/types.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ impl fmt::Display for ChannelId {
121121
}
122122

123123

124-
/// payment_hash type, use to cross-lock hop
124+
/// The payment hash is the hash of the [`PaymentPreimage`] which is the value used to lock funds
125+
/// in HTLCs while they transit the lightning network.
125126
///
126127
/// This is not exported to bindings users as we just use [u8; 32] directly
127128
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]
@@ -133,7 +134,8 @@ impl core::fmt::Display for PaymentHash {
133134
}
134135
}
135136

136-
/// payment_preimage type, use to route payment between hop
137+
/// The payment preimage is the "secret key" which is used to claim the funds of an HTLC on-chain
138+
/// or in a lightning channel.
137139
///
138140
/// This is not exported to bindings users as we just use [u8; 32] directly
139141
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]
@@ -152,7 +154,8 @@ impl From<PaymentPreimage> for PaymentHash {
152154
}
153155
}
154156

155-
/// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together
157+
/// The payment secret is used to authenticate the sender of an HTLC to the recipient and tie
158+
/// multi-part HTLCs together into a single payment.
156159
///
157160
/// This is not exported to bindings users as we just use [u8; 32] directly
158161
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]

0 commit comments

Comments
 (0)