Struct BlindedPaymentPath
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: BlindedPayInfo
The BlindedPayInfo
used to pay this blinded path.
Implementations§
§impl BlindedPaymentPath
impl BlindedPaymentPath
pub fn one_hop<ES, T>(
payee_node_id: PublicKey,
payee_tlvs: ReceiveTlvs,
min_final_cltv_expiry_delta: u16,
entropy_source: ES,
secp_ctx: &Secp256k1<T>,
) -> Result<BlindedPaymentPath, ()>
pub fn one_hop<ES, T>( payee_node_id: PublicKey, payee_tlvs: ReceiveTlvs, min_final_cltv_expiry_delta: u16, entropy_source: ES, secp_ctx: &Secp256k1<T>, ) -> Result<BlindedPaymentPath, ()>
Create a one-hop blinded path for a payment.
pub fn new<ES, T>(
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<BlindedPaymentPath, ()>
pub fn new<ES, T>( 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<BlindedPaymentPath, ()>
Create a blinded path for a payment, to be forwarded along intermediate_nodes
.
Errors if:
- a provided node id is invalid
BlindedPayInfo
calculation results in an integer overflow- any unknown features are required in the provided
ForwardTlvs
pub 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).
pub fn introduction_node(&self) -> &IntroductionNode
pub fn introduction_node(&self) -> &IntroductionNode
The IntroductionNode
of the blinded path.
pub fn blinding_point(&self) -> PublicKey
pub fn blinding_point(&self) -> PublicKey
Used by the IntroductionNode
to decrypt its encrypted_payload
to forward the payment.
pub fn blinded_hops(&self) -> &[BlindedHop]
pub fn blinded_hops(&self) -> &[BlindedHop]
The BlindedHop
s within the blinded path.
pub fn advance_path_by_one<NS, NL, T>(
&mut self,
node_signer: &NS,
node_id_lookup: &NL,
secp_ctx: &Secp256k1<T>,
) -> Result<(), ()>where
NS: Deref,
NL: Deref,
<NS as Deref>::Target: NodeSigner,
<NL as Deref>::Target: NodeIdLookUp,
T: Signing + Verification,
pub fn advance_path_by_one<NS, NL, T>(
&mut self,
node_signer: &NS,
node_id_lookup: &NL,
secp_ctx: &Secp256k1<T>,
) -> Result<(), ()>where
NS: Deref,
NL: Deref,
<NS as Deref>::Target: NodeSigner,
<NL as Deref>::Target: NodeIdLookUp,
T: Signing + Verification,
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
.
Trait Implementations§
§impl Clone for BlindedPaymentPath
impl Clone for BlindedPaymentPath
§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 more§impl Debug for BlindedPaymentPath
impl Debug for BlindedPaymentPath
§impl Hash for BlindedPaymentPath
impl Hash for BlindedPaymentPath
§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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request