pub trait LiquidityProxyAPI<Block: BlockT, DEXId, AssetId, Balance, SwapVariant, LiquiditySourceType, FilterMode>: Core<Block>where
DEXId: Codec,
AssetId: Codec + MaybeFromStr + MaybeDisplay,
Balance: Codec + MaybeFromStr + MaybeDisplay,
SwapVariant: Codec,
LiquiditySourceType: Codec,
FilterMode: Codec,{
// Provided methods
fn quote(
&self,
__runtime_api_at_param__: &BlockId<Block>,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfo<Balance, AssetId>>, ApiError> { ... }
fn quote_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfo<Balance, AssetId>>, ApiError> { ... }
fn quote_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError> { ... }
fn quote_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError> { ... }
fn is_path_available(
&self,
__runtime_api_at_param__: &BlockId<Block>,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId
) -> Result<bool, ApiError> { ... }
fn is_path_available_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId
) -> Result<bool, ApiError> { ... }
fn list_enabled_sources_for_path(
&self,
__runtime_api_at_param__: &BlockId<Block>,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId
) -> Result<Vec<LiquiditySourceType>, ApiError> { ... }
fn list_enabled_sources_for_path_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId
) -> Result<Vec<LiquiditySourceType>, ApiError> { ... }
}
Provided Methods§
fn quote( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, amount: BalanceWrapper, swap_variant: SwapVariant, selected_source_types: Vec<LiquiditySourceType>, filter_mode: FilterMode ) -> Result<Option<SwapOutcomeInfo<Balance, AssetId>>, ApiError>
fn quote_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, amount: BalanceWrapper, swap_variant: SwapVariant, selected_source_types: Vec<LiquiditySourceType>, filter_mode: FilterMode ) -> Result<Option<SwapOutcomeInfo<Balance, AssetId>>, ApiError>
sourcefn quote_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError>
fn quote_before_version_2( &self, __runtime_api_at_param__: &BlockId<Block>, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, amount: BalanceWrapper, swap_variant: SwapVariant, selected_source_types: Vec<LiquiditySourceType>, filter_mode: FilterMode ) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError>
👎Deprecated
sourcefn quote_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
dex_id: DEXId,
input_asset_id: AssetId,
output_asset_id: AssetId,
amount: BalanceWrapper,
swap_variant: SwapVariant,
selected_source_types: Vec<LiquiditySourceType>,
filter_mode: FilterMode
) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError>
fn quote_before_version_2_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, dex_id: DEXId, input_asset_id: AssetId, output_asset_id: AssetId, amount: BalanceWrapper, swap_variant: SwapVariant, selected_source_types: Vec<LiquiditySourceType>, filter_mode: FilterMode ) -> Result<Option<SwapOutcomeInfoV1<Balance, AssetId>>, ApiError>
👎Deprecated