@@ -1109,11 +1109,31 @@ where
1109
1109
fn get_cm(&self) -> &ChannelManager<M, T, ES, NS, SP, F, R, L> { self }
1110
1110
}
1111
1111
1112
- /// Manager which keeps track of a number of channels and sends messages to the appropriate
1113
- /// channel, also tracking HTLC preimages and forwarding onion packets appropriately.
1112
+ /// A lightning node's channel state machine and payment management logic.
1114
1113
///
1115
- /// Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
1116
- /// to individual Channels.
1114
+ /// [`ChannelManager`] is parameterized by a number of components, which in aggregate facilitate
1115
+ /// sending, forwarding, and receiving payments through lightning channels.
1116
+ /// - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each
1117
+ /// channel
1118
+ /// - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and
1119
+ /// closing channels
1120
+ /// - [`EntropySource`] for providing random data needed for cryptographic operations
1121
+ /// - [`NodeSigner`] for cryptographic operations scoped to the node
1122
+ /// - [`SignerProvider`] for providing signers whose operations are scoped to individual channels
1123
+ /// - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a
1124
+ /// timely manner
1125
+ /// - [`Router`] for finding payment paths when initiating and retrying payments
1126
+ /// - [`Logger`] for logging operational information of varying degrees
1127
+ ///
1128
+ /// Additionally, it implements the following traits:
1129
+ /// - [`ChannelMessageHandler`] to handle off-chain channel activity from peers
1130
+ /// - [`MessageSendEventsProvider`] to similarly send such messages to peers
1131
+ /// - [`OffersMessageHandler`] for BOLT 12 message handling and sending
1132
+ /// - [`EventsProvider`] to generate user-actionable [`Event`]s
1133
+ /// - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity
1134
+ ///
1135
+ /// Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an
1136
+ /// [`OnionMessenger`]. The latter is required to support BOLT 12 functionality.
1117
1137
///
1118
1138
/// # Persistence
1119
1139
///
@@ -1163,6 +1183,9 @@ where
1163
1183
/// [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when
1164
1184
/// you're using lightning-net-tokio.
1165
1185
///
1186
+ /// [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
1187
+ /// [`MessageHandler`]: crate::ln::peer_handler::MessageHandler
1188
+ /// [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
1166
1189
/// [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected
1167
1190
/// [`funding_created`]: msgs::FundingCreated
1168
1191
/// [`funding_transaction_generated`]: Self::funding_transaction_generated
0 commit comments