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:
- a provided node id is invalid
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.
Trait Implementations§
Source§impl Clone for BlindedPaymentPath
impl Clone for BlindedPaymentPath
Source§fn clone(&self) -> BlindedPaymentPath
fn clone(&self) -> BlindedPaymentPath
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlindedPaymentPath
impl Debug for BlindedPaymentPath
Source§impl Hash for BlindedPaymentPath
impl Hash for BlindedPaymentPath
Source§impl PartialEq for BlindedPaymentPath
impl PartialEq for BlindedPaymentPath
impl Eq for BlindedPaymentPath
impl StructuralPartialEq for BlindedPaymentPath
Auto Trait Implementations§
impl Freeze for BlindedPaymentPath
impl RefUnwindSafe for BlindedPaymentPath
impl Send for BlindedPaymentPath
impl Sync for BlindedPaymentPath
impl Unpin for BlindedPaymentPath
impl UnwindSafe for BlindedPaymentPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more