pub trait DexStableApiClient<BlockHash, CurrencyId, Balance, AccountId, PoolId>: ClientTwhere
    BlockHash: Send + Sync + 'static + Serialize,
    CurrencyId: Send + Sync + 'static + Serialize + DeserializeOwned,
    Balance: Send + Sync + 'static + Serialize,
    AccountId: Send + Sync + 'static,
    PoolId: Send + Sync + 'static + Serialize,{
Show 16 methods // Provided methods fn get_virtual_price<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_a<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_a_precise<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_currencies<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<CurrencyId>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<CurrencyId>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_lp_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<CurrencyId>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_currency_index<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, currency: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_currency_precision_multipliers<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_currency_balances<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_number_of_currencies<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_admin_balances<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_admin_balance<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn calculate_currency_amount<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amounts: Vec<Balance>, deposit: bool, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn calculate_swap<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, in_index: u32, out_index: u32, in_amount: Balance, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn calculate_remove_liquidity<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amount: Balance, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn calculate_remove_liquidity_one_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amount: Balance, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Client implementation for the DexStableApi RPC API.

Provided Methods§

source

fn get_virtual_price<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_a<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_a_precise<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_currencies<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<CurrencyId>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<CurrencyId>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_lp_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<CurrencyId>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_currency_index<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, currency: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_currency_precision_multipliers<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_currency_balances<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_number_of_currencies<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_admin_balances<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_admin_balance<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn calculate_currency_amount<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amounts: Vec<Balance>, deposit: bool, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn calculate_swap<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, in_index: u32, out_index: u32, in_amount: Balance, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn calculate_remove_liquidity<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amount: Balance, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<NumberOrHex>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn calculate_remove_liquidity_one_currency<'life0, 'async_trait>( &'life0 self, pool_id: PoolId, amount: Balance, index: u32, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<NumberOrHex>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<TypeJsonRpseeInteral, BlockHash, CurrencyId, Balance, AccountId, PoolId> DexStableApiClient<BlockHash, CurrencyId, Balance, AccountId, PoolId> for TypeJsonRpseeInteralwhere TypeJsonRpseeInteral: ClientT, BlockHash: Send + Sync + 'static + Serialize, CurrencyId: Send + Sync + 'static + Serialize + DeserializeOwned, Balance: Send + Sync + 'static + Serialize, AccountId: Send + Sync + 'static, PoolId: Send + Sync + 'static + Serialize,