pub trait LiquidityProxyAPIClient<BlockHash, DEXId, AssetId, Balance, SwapVariant, LiquiditySourceType, FilterMode, OutputTy>: ClientTwhere
    BlockHash: Send + Sync + 'static + Serialize,
    DEXId: Send + Sync + 'static + Serialize,
    AssetId: Send + Sync + 'static + Serialize,
    Balance: Send + Sync + 'static,
    SwapVariant: Send + Sync + 'static + Serialize,
    LiquiditySourceType: Send + Sync + 'static + Serialize + DeserializeOwned,
    FilterMode: Send + Sync + 'static + Serialize,
    OutputTy: Send + Sync + 'static + DeserializeOwned,{
    // Provided methods
    fn quote<'life0, 'async_trait>(
        &'life0 self,
        dex_id: DEXId,
        input_asset_id: AssetId,
        output_asset_id: AssetId,
        amount: BalanceWrapper,
        swap_variant: SwapVariant,
        selected_source_types: Vec<LiquiditySourceType>,
        filter_mode: FilterMode,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = Result<OutputTy>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn is_path_available<'life0, 'async_trait>(
        &'life0 self,
        dex_id: DEXId,
        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_enabled_sources_for_path<'life0, 'async_trait>(
        &'life0 self,
        dex_id: DEXId,
        input_asset_id: AssetId,
        output_asset_id: AssetId,
        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 LiquidityProxyAPI RPC API.

Provided Methods§

source

fn quote<'life0, 'async_trait>( &'life0 self, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, amount: BalanceWrapper, swap_variant: SwapVariant, selected_source_types: Vec<LiquiditySourceType>, filter_mode: FilterMode, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = Result<OutputTy>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn is_path_available<'life0, 'async_trait>( &'life0 self, dex_id: DEXId, 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,

source

fn list_enabled_sources_for_path<'life0, 'async_trait>( &'life0 self, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = Result<Vec<LiquiditySourceType>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<TypeJsonRpseeInteral, BlockHash, DEXId, AssetId, Balance, SwapVariant, LiquiditySourceType, FilterMode, OutputTy> LiquidityProxyAPIClient<BlockHash, DEXId, AssetId, Balance, SwapVariant, LiquiditySourceType, FilterMode, OutputTy> for TypeJsonRpseeInteralwhere TypeJsonRpseeInteral: ClientT, BlockHash: Send + Sync + 'static + Serialize, DEXId: Send + Sync + 'static + Serialize, AssetId: Send + Sync + 'static + Serialize, Balance: Send + Sync + 'static, SwapVariant: Send + Sync + 'static + Serialize, LiquiditySourceType: Send + Sync + 'static + Serialize + DeserializeOwned, FilterMode: Send + Sync + 'static + Serialize, OutputTy: Send + Sync + 'static + DeserializeOwned,