X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fchain%2Fkeysinterface.rs;h=9fc00e25238dc8b375d247aec5c8114ce508f109;hb=abf4e79dcda4c97dd80dd00233de32507184543a;hp=16075cdac4b2375b989abd28c7eec105af610c79;hpb=e1208bfd66908818604da97e924899d6843078da;p=rust-lightning diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index 16075cda..9fc00e25 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -137,7 +137,7 @@ impl_writeable_tlv_based!(StaticPaymentOutputDescriptor, { /// [`SpendableOutputs`]: crate::util::events::Event::SpendableOutputs #[derive(Clone, Debug, PartialEq, Eq)] pub enum SpendableOutputDescriptor { - /// An output to a script which was provided via [`KeysInterface`] directly, either from + /// An output to a script which was provided via [`SignerProvider`] directly, either from /// [`get_destination_script`] or [`get_shutdown_scriptpubkey`], thus you should already /// know how to spend it. No secret keys are provided as LDK was never given any key. /// These may include outputs from a transaction punishing our counterparty or claiming an HTLC @@ -517,7 +517,7 @@ pub trait SignerProvider { /// [`BaseSign::channel_keys_id`]. fn derive_channel_signer(&self, channel_value_satoshis: u64, channel_keys_id: [u8; 32]) -> Self::Signer; - /// Reads a [`Signer`] for this [`KeysInterface`] from the given input stream. + /// Reads a [`Signer`] for this [`SignerProvider`] from the given input stream. /// This is only called during deserialization of other objects which contain /// [`Sign`]-implementing objects (i.e., [`ChannelMonitor`]s and [`ChannelManager`]s). /// The bytes are exactly those which `::write()` writes, and @@ -545,9 +545,6 @@ pub trait SignerProvider { fn get_shutdown_scriptpubkey(&self) -> ShutdownScript; } -/// A trait to describe an object which can get user secrets and key material. -pub trait KeysInterface: EntropySource + NodeSigner + SignerProvider {} - #[derive(Clone)] /// A simple implementation of [`Sign`] that just keeps the private keys in memory. /// @@ -954,8 +951,8 @@ impl ReadableArgs for InMemorySigner { } } -/// Simple [`KeysInterface`] implementation that takes a 32-byte seed for use as a BIP 32 extended -/// key and derives keys from that. +/// Simple implementation of [`EntropySource`], [`NodeSigner`], and [`SignerProvider`] that takes a +/// 32-byte seed for use as a BIP 32 extended key and derives keys from that. /// /// Your `node_id` is seed/0'. /// Unilateral closes may use seed/1'. @@ -1331,8 +1328,6 @@ impl SignerProvider for KeysManager { } } -impl KeysInterface for KeysManager {} - /// Similar to [`KeysManager`], but allows the node using this struct to receive phantom node /// payments. /// @@ -1425,8 +1420,6 @@ impl SignerProvider for PhantomKeysManager { } } -impl KeysInterface for PhantomKeysManager {} - impl PhantomKeysManager { /// Constructs a [`PhantomKeysManager`] given a 32-byte seed and an additional `cross_node_seed` /// that is shared across all nodes that intend to participate in [phantom node payments]