Skip to content

Commit f562395

Browse files
committed
Misc documentation fixes
1 parent 5aa8f6f commit f562395

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

bindings/ldk_node.udl

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ dictionary ChannelDetails {
157157
ChannelId channel_id;
158158
PublicKey counterparty_node_id;
159159
OutPoint? funding_txo;
160-
u64 channel_value_satoshis;
160+
u64 channel_value_sats;
161161
u64? unspendable_punishment_reserve;
162162
UserChannelId user_channel_id;
163163
u32 feerate_sat_per_1000_weight;

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
18771877
/// A receiver knowing the corresponding `PublicKey` (e.g. the node’s id) and the message
18781878
/// can be sure that the signature was generated by the caller.
18791879
/// Signatures are EC recoverable, meaning that given the message and the
1880-
/// signature the PublicKey of the signer can be extracted.
1880+
/// signature the `PublicKey` of the signer can be extracted.
18811881
pub fn sign_message(&self, msg: &[u8]) -> Result<String, Error> {
18821882
self.keys_manager.sign_message(msg)
18831883
}

src/types.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -130,26 +130,26 @@ impl Readable for UserChannelId {
130130

131131
/// Details of a channel as returned by [`Node::list_channels`].
132132
///
133-
/// [`Node::list_channels`]: [`crate::Node::list_channels`]
133+
/// [`Node::list_channels`]: crate::Node::list_channels
134134
#[derive(Debug, Clone, PartialEq, Eq)]
135135
pub struct ChannelDetails {
136-
/// The channel's ID (prior to funding transaction generation, this is a random 32 bytes,
137-
/// thereafter this is the transaction ID of the funding transaction XOR the funding transaction
138-
/// output).
136+
/// The channel ID (prior to funding transaction generation, this is a random 32-byte
137+
/// identifier, afterwards this is the transaction ID of the funding transaction XOR the
138+
/// funding transaction output).
139139
///
140140
/// Note that this means this value is *not* persistent - it can change once during the
141141
/// lifetime of the channel.
142142
pub channel_id: ChannelId,
143-
/// The `node_id` of our channel's counterparty.
143+
/// The node ID of our the channel's counterparty.
144144
pub counterparty_node_id: PublicKey,
145145
/// The channel's funding transaction output, if we've negotiated the funding transaction with
146146
/// our counterparty already.
147147
pub funding_txo: Option<OutPoint>,
148-
/// The value, in satoshis, of this channel as appears in the funding output.
149-
pub channel_value_satoshis: u64,
150-
/// The value, in satoshis, that must always be held in the channel for us. This value ensures
151-
/// that if we broadcast a revoked state, our counterparty can punish us by claiming at least
152-
/// this value on chain.
148+
/// The value, in satoshis, of this channel as it appears in the funding output.
149+
pub channel_value_sats: u64,
150+
/// The value, in satoshis, that must always be held as a reserve in the channel for us. This
151+
/// value ensures that if we broadcast a revoked state, our counterparty can punish us by
152+
/// claiming at least this value on chain.
153153
///
154154
/// This value is not included in [`outbound_capacity_msat`] as it can never be spent.
155155
///
@@ -162,19 +162,19 @@ pub struct ChannelDetails {
162162
/// The currently negotiated fee rate denominated in satoshi per 1000 weight units,
163163
/// which is applied to commitment and HTLC transactions.
164164
pub feerate_sat_per_1000_weight: u32,
165-
/// Total balance of the channel. This is the amount that will be returned to the user if the
166-
/// channel is closed.
165+
/// The total balance of the channel. This is the amount that will be returned to
166+
/// the user if the channel is closed.
167167
///
168168
/// The value is not exact, due to potential in-flight and fee-rate changes. Therefore, exactly
169169
/// this amount is likely irrecoverable on close.
170170
pub balance_msat: u64,
171-
/// Available outbound capacity for sending HTLCs to the remote peer.
171+
/// The available outbound capacity for sending HTLCs to the remote peer.
172172
///
173173
/// The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose
174174
/// balance is not available for inclusion in new outbound HTLCs). This further does not include
175175
/// any pending outgoing HTLCs which are awaiting some other resolution to be sent.
176176
pub outbound_capacity_msat: u64,
177-
/// Available outbound capacity for sending HTLCs to the remote peer.
177+
/// The available outbound capacity for sending HTLCs to the remote peer.
178178
///
179179
/// The amount does not include any pending HTLCs which are not yet resolved
180180
/// (and, thus, whose balance is not available for inclusion in new inbound HTLCs). This further
@@ -190,13 +190,13 @@ pub struct ChannelDetails {
190190
pub confirmations: Option<u32>,
191191
/// Returns `true` if the channel was initiated (and therefore funded) by us.
192192
pub is_outbound: bool,
193-
/// Returns `true` if the channel is confirmed, both parties have exchanged `channel_ready`
194-
/// messages, and the channel is not currently being shut down. Both parties exchange
195-
/// `channel_ready` messages upon independently verifying that the required confirmations count
196-
/// provided by `confirmations_required` has been reached.
193+
/// Returns `true` if both parties have exchanged `channel_ready` messages, and the channel is
194+
/// not currently being shut down. Both parties exchange `channel_ready` messages upon
195+
/// independently verifying that the required confirmations count provided by
196+
/// `confirmations_required` has been reached.
197197
pub is_channel_ready: bool,
198-
/// Returns `true` if the channel is (a) confirmed and `channel_ready` has been exchanged,
199-
/// (b) the peer is connected, and (c) the channel is not currently negotiating shutdown.
198+
/// Returns `true` if the channel (a) `channel_ready` messages have been exchanged, (b) the
199+
/// peer is connected, and (c) the channel is not currently negotiating shutdown.
200200
///
201201
/// This is a strict superset of `is_channel_ready`.
202202
pub is_usable: bool,
@@ -213,7 +213,7 @@ impl From<LdkChannelDetails> for ChannelDetails {
213213
channel_id: ChannelId(value.channel_id),
214214
counterparty_node_id: value.counterparty.node_id,
215215
funding_txo: value.funding_txo.and_then(|o| Some(o.into_bitcoin_outpoint())),
216-
channel_value_satoshis: value.channel_value_satoshis,
216+
channel_value_sats: value.channel_value_satoshis,
217217
unspendable_punishment_reserve: value.unspendable_punishment_reserve,
218218
user_channel_id: UserChannelId(value.user_channel_id),
219219
balance_msat: value.balance_msat,
@@ -233,7 +233,7 @@ impl From<LdkChannelDetails> for ChannelDetails {
233233

234234
/// Details of a known Lightning peer as returned by [`Node::list_peers`].
235235
///
236-
/// [`Node::list_peers`]: [`crate::Node::list_peers`]
236+
/// [`Node::list_peers`]: crate::Node::list_peers
237237
#[derive(Debug, Clone, PartialEq, Eq)]
238238
pub struct PeerDetails {
239239
/// The node ID of the peer.

0 commit comments

Comments
 (0)