Skip to main content

SendPaymentMethod

Enum SendPaymentMethod 

Source
pub enum SendPaymentMethod {
    BitcoinAddress {
        address: BitcoinAddressDetails,
        fee_quote: SendOnchainFeeQuote,
    },
    Bolt11Invoice {
        invoice_details: Bolt11InvoiceDetails,
        spark_transfer_fee_sats: Option<u64>,
        lightning_fee_sats: u64,
    },
    SparkAddress {
        address: String,
        fee: u128,
        token_identifier: Option<String>,
    },
    SparkInvoice {
        spark_invoice_details: SparkInvoiceDetails,
        fee: u128,
        token_identifier: Option<String>,
    },
    CrossChainAddress {
        route: CrossChainRoutePair,
        recipient_address: String,
        amount_in: u128,
        asset_amount_in: u128,
        estimated_out: u128,
        fee_amount: u128,
        service_fee_amount: u128,
        service_fee_asset: Option<String>,
        source_transfer_fee_sats: u64,
        fee_mode: CrossChainFeeMode,
        expires_at: String,
        provider_context: CrossChainProviderContext,
    },
}

Variants§

§

BitcoinAddress

§

Bolt11Invoice

Fields

§invoice_details: Bolt11InvoiceDetails
§spark_transfer_fee_sats: Option<u64>
§lightning_fee_sats: u64
§

SparkAddress

Fields

§address: String
§fee: u128

Fee to pay for the transaction Denominated in sats if token identifier is empty, otherwise in the token base units

§token_identifier: Option<String>

The presence of this field indicates that the payment is for a token If empty, it is a Bitcoin payment

§

SparkInvoice

Fields

§spark_invoice_details: SparkInvoiceDetails
§fee: u128

Fee to pay for the transaction Denominated in sats if token identifier is empty, otherwise in the token base units

§token_identifier: Option<String>

The presence of this field indicates that the payment is for a token If empty, it is a Bitcoin payment

§

CrossChainAddress

A cross-chain send via a bridge/swap provider.

Fields

§route: CrossChainRoutePair

The route selected for this cross-chain send (includes provider, chain, asset).

§recipient_address: String

Raw destination address (e.g. 0xabc...).

§amount_in: u128

Amount routed to the provider, in the route’s source-asset units (Boltz invoice sats; Orchestra deposit sats/token). On the token-conversion path (both FeesIncluded and FeesExcluded) the dispatcher overrides this with the wallet-side token debit when the source token and destination asset form a USD-stable pair.

§asset_amount_in: u128

amount_in expressed in the cross-chain (destination) asset’s base units, via the same rate the SDK used at prepare time.

§estimated_out: u128

Estimated recipient amount in cross-chain asset base units.

§fee_amount: u128

Prepare-time total user-visible fee in cross-chain asset base units. Covers provider spread + bridge/gas + DEX slippage. On the token-conversion path it also rolls in the LN routing budget; on the direct path that budget lives separately in source_transfer_fee_sats.

§service_fee_amount: u128

Provider’s own service fee/spread in its native denomination.

§service_fee_asset: Option<String>

Asset which service fee is denominated in. Unset means BTC sats.

§source_transfer_fee_sats: u64

Sats budget for moving the amount in from the wallet to the provider.

§fee_mode: CrossChainFeeMode

Fee mode the prepare ran under; the send stage matches.

§expires_at: String

ISO8601 timestamp after which the quote is no longer valid.

§provider_context: CrossChainProviderContext

Provider-internal state, produced when preparing and consumed when sending.

Trait Implementations§

Source§

impl Clone for SendPaymentMethod

Source§

fn clone(&self) -> SendPaymentMethod

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SendPaymentMethod

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for SendPaymentMethod

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,