Skip to content

Commit 376df87

Browse files
committed
Update documentation on [u8; 32] wrappers for clarity
1 parent e818c4b commit 376df87

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
@@ -124,7 +124,8 @@ impl fmt::Display for ChannelId {
124124
}
125125

126126

127-
/// payment_hash type, use to cross-lock hop
127+
/// The payment hash is the hash of the [`PaymentPreimage`] which is the value used to lock funds
128+
/// in HTLCs while they transit the lightning network.
128129
///
129130
/// This is not exported to bindings users as we just use [u8; 32] directly
130131
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]
@@ -136,7 +137,8 @@ impl core::fmt::Display for PaymentHash {
136137
}
137138
}
138139

139-
/// payment_preimage type, use to route payment between hop
140+
/// The payment preimage is the "secret key" which is used to claim the funds of an HTLC on-chain
141+
/// or in a lightning channel.
140142
///
141143
/// This is not exported to bindings users as we just use [u8; 32] directly
142144
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug, Ord, PartialOrd)]
@@ -155,7 +157,8 @@ impl From<PaymentPreimage> for PaymentHash {
155157
}
156158
}
157159

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

0 commit comments

Comments
 (0)