pub struct BlindedPaymentPath {
pub payinfo: BlindedPayInfo,
/* private fields */
}Expand description
A blinded path to be used for sending or receiving a payment, hiding the identity of the recipient.
Fields§
§payinfo: BlindedPayInfoThe BlindedPayInfo used to pay this blinded path.
Implementations§
Source§impl BlindedPaymentPath
impl BlindedPaymentPath
Sourcepub fn one_hop<ES: Deref, T: Signing + Verification>(
payee_node_id: PublicKey,
payee_tlvs: ReceiveTlvs,
min_final_cltv_expiry_delta: u16,
entropy_source: ES,
secp_ctx: &Secp256k1<T>,
) -> Result<Self, ()>where
ES::Target: EntropySource,
pub fn one_hop<ES: Deref, T: Signing + Verification>(
payee_node_id: PublicKey,
payee_tlvs: ReceiveTlvs,
min_final_cltv_expiry_delta: u16,
entropy_source: ES,
secp_ctx: &Secp256k1<T>,
) -> Result<Self, ()>where
ES::Target: EntropySource,
Create a one-hop blinded path for a payment.
Sourcepub fn new<ES: Deref, T: Signing + Verification>(
intermediate_nodes: &[PaymentForwardNode],
payee_node_id: PublicKey,
payee_tlvs: ReceiveTlvs,
htlc_maximum_msat: u64,
min_final_cltv_expiry_delta: u16,
entropy_source: ES,
secp_ctx: &Secp256k1<T>,
) -> Result<Self, ()>where
ES::Target: EntropySource,
pub fn new<ES: Deref, T: Signing + Verification>(
intermediate_nodes: &[PaymentForwardNode],
payee_node_id: PublicKey,
payee_tlvs: ReceiveTlvs,
htlc_maximum_msat: u64,
min_final_cltv_expiry_delta: u16,
entropy_source: ES,
secp_ctx: &Secp256k1<T>,
) -> Result<Self, ()>where
ES::Target: EntropySource,
Create a blinded path for a payment, to be forwarded along intermediate_nodes.
Errors if:
BlindedPayInfocalculation results in an integer overflow- any unknown features are required in the provided
ForwardTlvs
Sourcepub fn public_introduction_node_id<'a>(
&self,
network_graph: &'a ReadOnlyNetworkGraph<'_>,
) -> Option<&'a NodeId>
pub fn public_introduction_node_id<'a>( &self, network_graph: &'a ReadOnlyNetworkGraph<'_>, ) -> Option<&'a NodeId>
Returns the introduction NodeId of the blinded path, if it is publicly reachable (i.e.,
it is found in the network graph).
Sourcepub fn introduction_node(&self) -> &IntroductionNode
pub fn introduction_node(&self) -> &IntroductionNode
The IntroductionNode of the blinded path.
Sourcepub fn blinding_point(&self) -> PublicKey
pub fn blinding_point(&self) -> PublicKey
Used by the IntroductionNode to decrypt its encrypted_payload to forward the payment.
Sourcepub fn blinded_hops(&self) -> &[BlindedHop]
pub fn blinded_hops(&self) -> &[BlindedHop]
The BlindedHops within the blinded path.
Sourcepub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
&mut self,
node_signer: &NS,
node_id_lookup: &NL,
secp_ctx: &Secp256k1<T>,
) -> Result<(), ()>
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>( &mut self, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>, ) -> Result<(), ()>
Advance the blinded onion payment path by one hop, making the second hop into the new introduction node.
Will only modify self when returning Ok.
Sourcepub fn from_blinded_path_and_payinfo(
introduction_node_id: PublicKey,
blinding_point: PublicKey,
blinded_hops: Vec<BlindedHop>,
payinfo: BlindedPayInfo,
) -> Self
pub fn from_blinded_path_and_payinfo( introduction_node_id: PublicKey, blinding_point: PublicKey, blinded_hops: Vec<BlindedHop>, payinfo: BlindedPayInfo, ) -> Self
Builds a new BlindedPaymentPath from its constituent parts.
Useful when reconstructing a blinded path from previously serialized components.
Parameters:
introduction_node_id: The public key of the introduction node in the path.blinding_point: The public key used for blinding the path.blinded_hops: The encrypted routing information for each hop in the path.payinfo: TheBlindedPayInfofor the blinded path.
Trait Implementations§
Source§impl Clone for BlindedPaymentPath
impl Clone for BlindedPaymentPath
Source§fn clone(&self) -> BlindedPaymentPath
fn clone(&self) -> BlindedPaymentPath
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more