pub enum PaymentRequest {
Input {
input: String,
},
CrossChain {
address: String,
route: CrossChainRoutePair,
max_slippage_bps: Option<u32>,
target_overpay_bps: Option<u32>,
},
}Expand description
The payment destination. Either a raw string (bolt11, spark address, BIP-21, cross-chain URI, etc.) that is parsed internally, or a structured cross-chain destination with explicit chain + asset selection.
Variants§
Input
Unparsed user input string (bolt11, spark address, BIP-21, cross-chain URI, etc.)
CrossChain
Cross-chain send with a selected route from get_cross_chain_routes().
Amount comes from PrepareSendPaymentRequest.amount, not here.
Fields
route: CrossChainRoutePairmax_slippage_bps: Option<u32>Maximum slippage tolerance in basis points (1/100 of a percent)
for the cross-chain quote. Must be in 10..=500. Falls back to
[Config::default_slippage_bps] when None, which itself
defaults to 100 bps (1%) when unset.
target_overpay_bps: Option<u32>Target-overpay pad in basis points applied on FeesExcluded
conversion sends. Inflates the destination target before quoting
so the recipient lands at or above the user’s requested amount
despite provider slippage. Must be in 0..=500. Falls back to
CrossChainConfig::default_target_overpay_bps when None,
which itself defaults to 15 bps.
Trait Implementations§
Source§impl Clone for PaymentRequest
impl Clone for PaymentRequest
Source§fn clone(&self) -> PaymentRequest
fn clone(&self) -> PaymentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaymentRequest
impl Debug for PaymentRequest
Auto Trait Implementations§
impl Freeze for PaymentRequest
impl RefUnwindSafe for PaymentRequest
impl Send for PaymentRequest
impl Sync for PaymentRequest
impl Unpin for PaymentRequest
impl UnsafeUnpin for PaymentRequest
impl UnwindSafe for PaymentRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 moreSource§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>
T in a tonic::Request