pub struct SpontaneousPayment { /* private fields */ }Expand description
A payment handler allowing to send spontaneous (“keysend”) payments.
Should be retrieved by calling Node::spontaneous_payment.
Implementations§
Source§impl SpontaneousPayment
impl SpontaneousPayment
Sourcepub fn send(
&self,
amount_msat: u64,
node_id: PublicKey,
sending_parameters: Option<SendingParameters>,
) -> Result<PaymentId, Error>
pub fn send( &self, amount_msat: u64, node_id: PublicKey, sending_parameters: Option<SendingParameters>, ) -> Result<PaymentId, Error>
Send a spontaneous aka. “keysend”, payment.
If sending_parameters are provided they will override the default as well as the
node-wide parameters configured via Config::sending_parameters on a per-field basis.
Sourcepub fn send_with_custom_tlvs(
&self,
amount_msat: u64,
node_id: PublicKey,
sending_parameters: Option<SendingParameters>,
custom_tlvs: Vec<CustomTlvRecord>,
) -> Result<PaymentId, Error>
pub fn send_with_custom_tlvs( &self, amount_msat: u64, node_id: PublicKey, sending_parameters: Option<SendingParameters>, custom_tlvs: Vec<CustomTlvRecord>, ) -> Result<PaymentId, Error>
Send a spontaneous payment including a list of custom TLVs.
Sourcepub fn send_probes(
&self,
amount_msat: u64,
node_id: PublicKey,
) -> Result<(), Error>
pub fn send_probes( &self, amount_msat: u64, node_id: PublicKey, ) -> Result<(), Error>
Sends payment probes over all paths of a route that would be used to pay the given
amount to the given node_id.
See Bolt11Payment::send_probes for more information.
Auto Trait Implementations§
impl Freeze for SpontaneousPayment
impl !RefUnwindSafe for SpontaneousPayment
impl Send for SpontaneousPayment
impl Sync for SpontaneousPayment
impl Unpin for SpontaneousPayment
impl !UnwindSafe for SpontaneousPayment
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more