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,
route_parameters: Option<RouteParametersConfig>,
) -> Result<PaymentId, Error>
pub fn send( &self, amount_msat: u64, node_id: PublicKey, route_parameters: Option<RouteParametersConfig>, ) -> Result<PaymentId, Error>
Send a spontaneous aka. “keysend”, payment.
If route_parameters are provided they will override the default as well as the
node-wide parameters configured via Config::route_parameters on a per-field basis.
Sourcepub fn send_with_custom_tlvs(
&self,
amount_msat: u64,
node_id: PublicKey,
route_parameters: Option<RouteParametersConfig>,
custom_tlvs: Vec<CustomTlvRecord>,
) -> Result<PaymentId, Error>
pub fn send_with_custom_tlvs( &self, amount_msat: u64, node_id: PublicKey, route_parameters: Option<RouteParametersConfig>, custom_tlvs: Vec<CustomTlvRecord>, ) -> Result<PaymentId, Error>
Send a spontaneous payment including a list of custom TLVs.
Sourcepub fn send_with_preimage(
&self,
amount_msat: u64,
node_id: PublicKey,
preimage: PaymentPreimage,
route_parameters: Option<RouteParametersConfig>,
) -> Result<PaymentId, Error>
pub fn send_with_preimage( &self, amount_msat: u64, node_id: PublicKey, preimage: PaymentPreimage, route_parameters: Option<RouteParametersConfig>, ) -> Result<PaymentId, Error>
Send a spontaneous payment with custom preimage
Sourcepub fn send_with_preimage_and_custom_tlvs(
&self,
amount_msat: u64,
node_id: PublicKey,
custom_tlvs: Vec<CustomTlvRecord>,
preimage: PaymentPreimage,
route_parameters: Option<RouteParametersConfig>,
) -> Result<PaymentId, Error>
pub fn send_with_preimage_and_custom_tlvs( &self, amount_msat: u64, node_id: PublicKey, custom_tlvs: Vec<CustomTlvRecord>, preimage: PaymentPreimage, route_parameters: Option<RouteParametersConfig>, ) -> Result<PaymentId, Error>
Send a spontaneous payment with custom preimage 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