mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Add accessor methods for inner blinded path fields.
This commit is contained in:
parent
10449b96de
commit
c563c150f0
2 changed files with 34 additions and 0 deletions
|
@ -120,6 +120,23 @@ impl BlindedMessagePath {
|
|||
) -> Option<&'a NodeId> {
|
||||
self.0.public_introduction_node_id(network_graph)
|
||||
}
|
||||
|
||||
/// The [`IntroductionNode`] of the blinded path.
|
||||
pub fn introduction_node(&self) -> &IntroductionNode {
|
||||
&self.0.introduction_node
|
||||
}
|
||||
|
||||
/// Used by the [`IntroductionNode`] to decrypt its [`encrypted_payload`] to forward the message.
|
||||
///
|
||||
/// [`encrypted_payload`]: BlindedHop::encrypted_payload
|
||||
pub fn blinding_point(&self) -> PublicKey {
|
||||
self.0.blinding_point
|
||||
}
|
||||
|
||||
/// The [`BlindedHop`]s within the blinded path.
|
||||
pub fn blinded_hops(&self) -> &[BlindedHop] {
|
||||
&self.0.blinded_hops
|
||||
}
|
||||
}
|
||||
|
||||
/// An intermediate node, and possibly a short channel id leading to the next node.
|
||||
|
|
|
@ -103,6 +103,23 @@ impl BlindedPaymentPath {
|
|||
) -> Option<&'a NodeId> {
|
||||
self.0.public_introduction_node_id(network_graph)
|
||||
}
|
||||
|
||||
/// The [`IntroductionNode`] of the blinded path.
|
||||
pub fn introduction_node(&self) -> &IntroductionNode {
|
||||
&self.0.introduction_node
|
||||
}
|
||||
|
||||
/// Used by the [`IntroductionNode`] to decrypt its [`encrypted_payload`] to forward the payment.
|
||||
///
|
||||
/// [`encrypted_payload`]: BlindedHop::encrypted_payload
|
||||
pub fn blinding_point(&self) -> PublicKey {
|
||||
self.0.blinding_point
|
||||
}
|
||||
|
||||
/// The [`BlindedHop`]s within the blinded path.
|
||||
pub fn blinded_hops(&self) -> &[BlindedHop] {
|
||||
&self.0.blinded_hops
|
||||
}
|
||||
}
|
||||
|
||||
/// An intermediate node, its outbound channel, and relay parameters.
|
||||
|
|
Loading…
Add table
Reference in a new issue