Trait dex_api_rpc::DEXAPIClient
source · pub trait DEXAPIClient<BlockHash, AssetId, DEXId, Balance, LiquiditySourceType, SwapVariant, SwapResponse>: ClientTwhere
BlockHash: Send + Sync + 'static + Serialize,
AssetId: Send + Sync + 'static + Serialize,
DEXId: Send + Sync + 'static + Serialize,
Balance: Send + Sync + 'static,
LiquiditySourceType: Send + Sync + 'static + Serialize + DeserializeOwned,
SwapVariant: Send + Sync + 'static + Serialize,
SwapResponse: Send + Sync + 'static + DeserializeOwned,{
// Provided methods
fn quote<'life0, 'async_trait>(
&'life0 self,
dex_id: DEXId,
liquidity_source_type: LiquiditySourceType,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = Result<SwapResponse>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn can_exchange<'life0, 'async_trait>(
&'life0 self,
dex_id: DEXId,
liquidity_source_type: LiquiditySourceType,
input_asset_id: AssetId,
output_asset_id: AssetId,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn list_supported_sources<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = Result<Vec<LiquiditySourceType>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the DEXAPI
RPC API.