From: Matt Corallo Date: Thu, 28 May 2020 20:00:46 +0000 (-0400) Subject: Expose private keys from InMemoryChannelKeys publicly X-Git-Tag: v0.0.12~60^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b1d536e57ac99c7446f50c4f64c4a8b46c3b3830;p=rust-lightning Expose private keys from InMemoryChannelKeys publicly As we drop the requirement that all ChannelKeys expose the private keys used, we should have a way to access the private keys in use when using InMemoryChannelKeys. --- diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index 9de35f0ef..b7583bb1f 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -345,17 +345,17 @@ pub trait KeysInterface: Send + Sync { /// A simple implementation of ChannelKeys that just keeps the private keys in memory. pub struct InMemoryChannelKeys { /// Private key of anchor tx - funding_key: SecretKey, + pub funding_key: SecretKey, /// Local secret key for blinded revocation pubkey - revocation_base_key: SecretKey, + pub revocation_base_key: SecretKey, /// Local secret key used for our balance in remote-broadcasted commitment transactions - payment_key: SecretKey, + pub payment_key: SecretKey, /// Local secret key used in HTLC tx - delayed_payment_base_key: SecretKey, + pub delayed_payment_base_key: SecretKey, /// Local htlc secret key used in commitment tx htlc outputs - htlc_base_key: SecretKey, + pub htlc_base_key: SecretKey, /// Commitment seed - commitment_seed: [u8; 32], + pub commitment_seed: [u8; 32], /// Local public keys and basepoints pub(crate) local_channel_pubkeys: ChannelPublicKeys, /// Remote public keys and base points