Skip to content

Commit 6946b5d

Browse files
Make BlindedPath type private.
Users should use the Blinded{Message,Payment}Path types instead.
1 parent 120fe21 commit 6946b5d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lightning/src/blinded_path/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::util::ser::{FixedLengthReader, LengthReadableArgs, Readable, Writeabl
3232
use core::mem;
3333
use core::ops::Deref;
3434

35-
/// A [`BlindedPath`] to be used for sending or receiving a message, hiding the identity of the
35+
/// A blinded path to be used for sending or receiving a message, hiding the identity of the
3636
/// recipient.
3737
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
3838
pub struct BlindedMessagePath(pub(super) BlindedPath);

lightning/src/blinded_path/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub enum NextMessageHop {
3737
/// Onion messages and payments can be sent and received to blinded paths, which serve to hide the
3838
/// identity of the recipient.
3939
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
40-
pub struct BlindedPath {
40+
pub(super) struct BlindedPath {
4141
/// To send to a blinded path, the sender first finds a route to the unblinded
4242
/// `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
4343
/// message or payment's next hop and forward it along.
@@ -53,7 +53,7 @@ pub struct BlindedPath {
5353
pub blinded_hops: Vec<BlindedHop>,
5454
}
5555

56-
/// The unblinded node in a [`BlindedPath`].
56+
/// The unblinded node in a blinded path.
5757
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
5858
pub enum IntroductionNode {
5959
/// The node id of the introduction node.
@@ -63,8 +63,8 @@ pub enum IntroductionNode {
6363
DirectedShortChannelId(Direction, u64),
6464
}
6565

66-
/// The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines
67-
/// which nodes is which in the [`ChannelAnnouncement`] message.
66+
/// The side of a channel that is the [`IntroductionNode`] in a blinded path. [BOLT 7] defines which
67+
/// nodes is which in the [`ChannelAnnouncement`] message.
6868
///
6969
/// [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
7070
/// [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement
@@ -109,9 +109,9 @@ impl Deref for EmptyNodeIdLookUp {
109109
/// and thus can be used to hide the identity of the recipient.
110110
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
111111
pub struct BlindedHop {
112-
/// The blinded node id of this hop in a [`BlindedPath`].
112+
/// The blinded node id of this hop in a blinded path.
113113
pub blinded_node_id: PublicKey,
114-
/// The encrypted payload intended for this hop in a [`BlindedPath`].
114+
/// The encrypted payload intended for this hop in a blinded path.
115115
// The node sending to this blinded path will later encode this payload into the onion packet for
116116
// this hop.
117117
pub encrypted_payload: Vec<u8>,

lightning/src/blinded_path/payment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use core::ops::Deref;
3434
#[allow(unused_imports)]
3535
use crate::prelude::*;
3636

37-
/// A [`BlindedPath`] to be used for sending or receiving a payment, hiding the identity of the
37+
/// A blinded path to be used for sending or receiving a payment, hiding the identity of the
3838
/// recipient.
3939
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
4040
pub struct BlindedPaymentPath(pub(super) BlindedPath);

0 commit comments

Comments
 (0)