pub enum ConversionInfo {
Amm {
pool_id: String,
conversion_id: String,
status: ConversionStatus,
fee: Option<u128>,
purpose: Option<ConversionPurpose>,
amount_adjustment: Option<AmountAdjustmentReason>,
},
Orchestra {Show 16 fields
order_id: String,
quote_id: String,
read_token: Option<String>,
chain: String,
chain_id: Option<String>,
asset: String,
recipient_address: String,
asset_amount_in: Option<u128>,
estimated_out: u128,
delivered_amount: Option<u128>,
status: ConversionStatus,
fee_amount: Option<u128>,
service_fee_amount: Option<u128>,
service_fee_asset: Option<String>,
asset_decimals: u32,
asset_contract: Option<String>,
},
Boltz {Show 19 fields
swap_id: String,
invoice: String,
invoice_amount_sats: u64,
bridge_ref: Option<String>,
max_slippage_bps: u32,
quote_degraded: bool,
chain: String,
chain_id: Option<String>,
asset: String,
recipient_address: String,
estimated_out: u128,
delivered_amount: Option<u128>,
status: ConversionStatus,
asset_amount_in: Option<u128>,
fee_amount: Option<u128>,
service_fee_amount: Option<u128>,
service_fee_asset: Option<String>,
asset_decimals: u32,
asset_contract: Option<String>,
},
}Expand description
Details of the asset conversion attached to a payment, when the payment involves a swap or cross-chain bridge in addition to the on-Spark transfer.
The variant identifies which provider handled the conversion:
ConversionInfo::Ammfor Spark token swaps via Flashnet AMM pools.ConversionInfo::Orchestrafor cross-chain sends via Flashnet Orchestra (Spark → external chain).ConversionInfo::Boltzfor sats → stable-coin reverse swaps via Boltz.
Variants§
Amm
AMM (Flashnet pool-based) conversion — Spark ↔ Spark token swaps.
Fields
status: ConversionStatusThe status of the conversion
fee: Option<u128>The fee paid for the conversion. Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
purpose: Option<ConversionPurpose>The purpose of the conversion
amount_adjustment: Option<AmountAdjustmentReason>The reason the conversion amount was adjusted, if applicable.
Orchestra
Orchestra cross-chain conversion via the Flashnet orchestration API.
Fields
chain_id: Option<String>Stable chain identifier (e.g. EVM chainId decimal string "8453"
for Base, SLIP-44 or similar for other chains). None if the
provider doesn’t expose one for this route.
asset_amount_in: Option<u128>Amount in expressed in the cross-chain asset’s base units, via the rate the SDK used at prepare time.
delivered_amount: Option<u128>Actual delivered amount, Unset until the order reaches a terminal state.
status: ConversionStatusBoltz
Boltz reverse swap: cross-chain conversion via Lightning hold invoice.
The swap’s secrets and lifecycle state live on the synced Boltz swap row
keyed by swap_id, which also drives cross-instance recovery.
Fields
bridge_ref: Option<String>Cross-chain bridge tracking handle for bridged swaps: a LayerZero
message GUID for OFT (USDT0) routes, or a CCTP reference for USDC
routes. None for same-chain (Arbitrum-direct) delivery.
chain_id: Option<String>Stable chain identifier (e.g. EVM chainId decimal string "42161"
for Arbitrum). None if the provider doesn’t expose one for this
route.
status: ConversionStatusCurrent status of the reverse swap.
asset_amount_in: Option<u128>Amount in expressed in the cross-chain asset’s base units, via the BTC/USD rate the SDK used at prepare time.
Implementations§
Source§impl ConversionInfo
impl ConversionInfo
Sourcepub fn status(&self) -> &ConversionStatus
pub fn status(&self) -> &ConversionStatus
The current status, regardless of conversion type.
Sourcepub fn status_mut(&mut self) -> &mut ConversionStatus
pub fn status_mut(&mut self) -> &mut ConversionStatus
A mutable reference to the status, for in-place updates.
Sourcepub fn fee(&self) -> Option<u128>
pub fn fee(&self) -> Option<u128>
Headline fee: AMM pool fee in source units, or the cross-chain total in destination-asset base units.
Sourcepub fn is_orchestra(&self) -> bool
pub fn is_orchestra(&self) -> bool
Whether this is an Orchestra (cross-chain) conversion.
Trait Implementations§
Source§impl Clone for ConversionInfo
impl Clone for ConversionInfo
Source§fn clone(&self) -> ConversionInfo
fn clone(&self) -> ConversionInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConversionInfo
impl Debug for ConversionInfo
Source§impl<'de> Deserialize<'de> for ConversionInfo
impl<'de> Deserialize<'de> for ConversionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ConversionInfo
impl PartialEq for ConversionInfo
Source§impl Serialize for ConversionInfo
impl Serialize for ConversionInfo
impl StructuralPartialEq for ConversionInfo
Auto Trait Implementations§
impl Freeze for ConversionInfo
impl RefUnwindSafe for ConversionInfo
impl Send for ConversionInfo
impl Sync for ConversionInfo
impl Unpin for ConversionInfo
impl UnsafeUnpin for ConversionInfo
impl UnwindSafe for ConversionInfo
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