projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4f690c
)
Update docs for slightly more clarity on channel key derivation
author
Matt Corallo
<git@bluematt.me>
Mon, 27 Nov 2023 18:32:08 +0000
(18:32 +0000)
committer
Matt Corallo
<git@bluematt.me>
Tue, 9 Jan 2024 22:24:59 +0000
(22:24 +0000)
lightning/src/ln/channel_keys.rs
patch
|
blob
|
history
diff --git
a/lightning/src/ln/channel_keys.rs
b/lightning/src/ln/channel_keys.rs
index 3ea9ac01a65cce40991036e299e64ad9a039ed4c..fbb0162e93c6f9243fba3add6d5ce1f96618b0b3 100644
(file)
--- a/
lightning/src/ln/channel_keys.rs
+++ b/
lightning/src/ln/channel_keys.rs
@@
-50,18
+50,18
@@
macro_rules! basepoint_impl {
macro_rules! key_impl {
($BasepointT:ty, $KeyName:expr) => {
doc_comment! {
macro_rules! key_impl {
($BasepointT:ty, $KeyName:expr) => {
doc_comment! {
- concat!("
Generate ", $KeyName, " using per_commitment_point
"),
+ concat!("
Derive a public ", $KeyName, " using one node's `per_commitment_point` and its countersignatory's `basepoint`
"),
pub fn from_basepoint<T: secp256k1::Signing>(
secp_ctx: &Secp256k1<T>,
pub fn from_basepoint<T: secp256k1::Signing>(
secp_ctx: &Secp256k1<T>,
- basepoint: &$BasepointT,
+
countersignatory_
basepoint: &$BasepointT,
per_commitment_point: &PublicKey,
) -> Self {
per_commitment_point: &PublicKey,
) -> Self {
- Self(derive_public_key(secp_ctx, per_commitment_point, &basepoint.0))
+ Self(derive_public_key(secp_ctx, per_commitment_point, &
countersignatory_
basepoint.0))
}
}
doc_comment! {
}
}
doc_comment! {
- concat!("
Generate ", $KeyName, " from priv
key"),
+ concat!("
Build a ", $KeyName, " directly from an already-derived private
key"),
pub fn from_secret_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, sk: &SecretKey) -> Self {
Self(PublicKey::from_secret_key(&secp_ctx, &sk))
}
pub fn from_secret_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, sk: &SecretKey) -> Self {
Self(PublicKey::from_secret_key(&secp_ctx, &sk))
}