pub enum ReceivePaymentMethod {
SparkAddress,
SparkInvoice {
amount: Option<u128>,
token_identifier: Option<String>,
expiry_time: Option<u64>,
description: Option<String>,
sender_public_key: Option<String>,
},
BitcoinAddress {
new_address: Option<bool>,
},
Bolt11Invoice {
description: String,
amount_sats: Option<u64>,
expiry_secs: Option<u32>,
payment_hash: Option<String>,
receiver_identity_public_key: Option<String>,
},
CrossChain {
route: CrossChainRoutePair,
amount: u128,
destination: Option<SparkAsset>,
fee_mode: Option<CrossChainFeeMode>,
max_slippage_bps: Option<u32>,
target_overpay_bps: Option<u32>,
},
}Variants§
SparkAddress
SparkInvoice
Fields
amount: Option<u128>Amount to receive. Denominated in sats if token identifier is empty, otherwise in the token base units
BitcoinAddress
Fields
Bolt11Invoice
Fields
CrossChain
Fields
route: CrossChainRoutePairThe selected cross-chain route in the receive direction.
amount: u128The amount, in the source asset’s base units (route.decimals).
USD-stable sources are at parity, so 1 USD = 10^route.decimals
(e.g. 1_000_000 for 6-decimal USDC/USDT, 10^18 for 18-decimal
BSC USDC).
FeesExcluded(default): what the receiver ends up with, sized as ifamountsource units were converted to the Spark-side destination at parity (USDB) or the live BTC/USD rate (Bitcoin).FeesIncluded: what the sender deposits. The receiver ends up with that amount minus provider fees.
destination: Option<SparkAsset>Spark-side asset the receiver wants delivered. When absent, the
SDK auto-selects: the wallet’s active stable-balance token if
the route supports it, otherwise Bitcoin (sats). When set, the
value must appear in the route’s accepted_assets.
fee_mode: Option<CrossChainFeeMode>How amount should be interpreted. When absent, defaults to
FeesExcluded.
max_slippage_bps: Option<u32>Maximum slippage in basis points. When absent, the SDK default (100 bps) is used.
target_overpay_bps: Option<u32>Per-request override for the overpay buffer applied to the
sender’s deposit when fee_mode == FeesExcluded. Range 0 to 500.
When absent, falls back to CrossChainConfig::default_target_overpay_bps
then the built-in default (15 bps). Ignored when fee_mode
is FeesIncluded.
Trait Implementations§
Source§impl Clone for ReceivePaymentMethod
impl Clone for ReceivePaymentMethod
Source§fn clone(&self) -> ReceivePaymentMethod
fn clone(&self) -> ReceivePaymentMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReceivePaymentMethod
impl Debug for ReceivePaymentMethod
Auto Trait Implementations§
impl Freeze for ReceivePaymentMethod
impl RefUnwindSafe for ReceivePaymentMethod
impl Send for ReceivePaymentMethod
impl Sync for ReceivePaymentMethod
impl Unpin for ReceivePaymentMethod
impl UnsafeUnpin for ReceivePaymentMethod
impl UnwindSafe for ReceivePaymentMethod
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