Skip to content

Commit a8a3917

Browse files
committed
Remove KeysInterface trait.
1 parent 3521e8b commit a8a3917

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lightning/src/chain/keysinterface.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl_writeable_tlv_based!(StaticPaymentOutputDescriptor, {
137137
/// [`SpendableOutputs`]: crate::util::events::Event::SpendableOutputs
138138
#[derive(Clone, Debug, PartialEq, Eq)]
139139
pub enum SpendableOutputDescriptor {
140-
/// An output to a script which was provided via [`KeysInterface`] directly, either from
140+
/// An output to a script which was provided via [`SignerProvider`] directly, either from
141141
/// [`get_destination_script`] or [`get_shutdown_scriptpubkey`], thus you should already
142142
/// know how to spend it. No secret keys are provided as LDK was never given any key.
143143
/// These may include outputs from a transaction punishing our counterparty or claiming an HTLC
@@ -517,7 +517,7 @@ pub trait SignerProvider {
517517
/// [`BaseSign::channel_keys_id`].
518518
fn derive_channel_signer(&self, channel_value_satoshis: u64, channel_keys_id: [u8; 32]) -> Self::Signer;
519519

520-
/// Reads a [`Signer`] for this [`KeysInterface`] from the given input stream.
520+
/// Reads a [`Signer`] for this [`SignerProvider`] from the given input stream.
521521
/// This is only called during deserialization of other objects which contain
522522
/// [`Sign`]-implementing objects (i.e., [`ChannelMonitor`]s and [`ChannelManager`]s).
523523
/// The bytes are exactly those which `<Self::Signer as Writeable>::write()` writes, and
@@ -545,9 +545,6 @@ pub trait SignerProvider {
545545
fn get_shutdown_scriptpubkey(&self) -> ShutdownScript;
546546
}
547547

548-
/// A trait to describe an object which can get user secrets and key material.
549-
pub trait KeysInterface: EntropySource + NodeSigner + SignerProvider {}
550-
551548
#[derive(Clone)]
552549
/// A simple implementation of [`Sign`] that just keeps the private keys in memory.
553550
///
@@ -954,8 +951,8 @@ impl ReadableArgs<SecretKey> for InMemorySigner {
954951
}
955952
}
956953

957-
/// Simple [`KeysInterface`] implementation that takes a 32-byte seed for use as a BIP 32 extended
958-
/// key and derives keys from that.
954+
/// Simple implementation of [`EntropySource`], [`NodeSigner`], and [`SignerProvider`] that takes a
955+
/// 32-byte seed for use as a BIP 32 extended key and derives keys from that.
959956
///
960957
/// Your `node_id` is seed/0'.
961958
/// Unilateral closes may use seed/1'.
@@ -1331,8 +1328,6 @@ impl SignerProvider for KeysManager {
13311328
}
13321329
}
13331330

1334-
impl KeysInterface for KeysManager {}
1335-
13361331
/// Similar to [`KeysManager`], but allows the node using this struct to receive phantom node
13371332
/// payments.
13381333
///
@@ -1425,8 +1420,6 @@ impl SignerProvider for PhantomKeysManager {
14251420
}
14261421
}
14271422

1428-
impl KeysInterface for PhantomKeysManager {}
1429-
14301423
impl PhantomKeysManager {
14311424
/// Constructs a [`PhantomKeysManager`] given a 32-byte seed and an additional `cross_node_seed`
14321425
/// that is shared across all nodes that intend to participate in [phantom node payments]

0 commit comments

Comments
 (0)