Skip to content

Commit ee66cfd

Browse files
committed
Introduce BlindedPathType
1. Introduce a new enum that allows the user to specify the type of Blinded Path (whether Compact or Full-Length) when creating a Blinded Path. 2. This PR utilizes this new enum in two ways in the upcoming commits: - Allows explicitly providing the type of Blinded Path to be created instead of relying on the absolute expiry time for offers and refunds. - Simplifies the Blinded Path creation process by enabling a single function flow for creating both types of Blinded Path.
1 parent d49a08a commit ee66cfd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,14 @@ pub enum MessageSendInstructions {
444444
},
445445
}
446446

447+
/// Represents the types of [`BlindedMessagePath`] that can be created.
448+
pub enum BlindedPathType {
449+
/// Whether the created [`BlindedMessagePath`]s are compact.
450+
Compact,
451+
/// Whether the created [`BlindedMessagePath`]s are full-length.
452+
Full,
453+
}
454+
447455
/// A trait defining behavior for routing an [`OnionMessage`].
448456
pub trait MessageRouter {
449457
/// Returns a route for sending an [`OnionMessage`] to the given [`Destination`].

0 commit comments

Comments
 (0)