From b1d536e57ac99c7446f50c4f64c4a8b46c3b3830 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 28 May 2020 16:00:46 -0400 Subject: [PATCH] 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. --- lightning/src/chain/keysinterface.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.39.5