RPCClient

Trait RPCClient 

Source
pub trait RPCClient: Send + Sync {
Show 13 methods // Required methods fn get_contract_state<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 StateRequestBody, ) -> Pin<Box<dyn Future<Output = Result<StateRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_protocol_components<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolComponentsRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolComponentRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_protocol_states<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolStateRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolStateRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_tokens<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TokensRequestBody, ) -> Pin<Box<dyn Future<Output = Result<TokensRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_protocol_systems<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolSystemsRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolSystemsRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_component_tvl<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ComponentTvlRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ComponentTvlRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_traced_entry_points<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TracedEntryPointRequestBody, ) -> Pin<Box<dyn Future<Output = Result<TracedEntryPointRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn get_contract_state_paginated<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chain: Chain, ids: &'life1 [Bytes], protocol_system: &'life2 str, version: &'life3 VersionParam, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<StateRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_protocol_components_paginated<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolComponentsRequestBody, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ProtocolComponentRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_protocol_states_paginated<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, chain: Chain, ids: &'life1 [T], protocol_system: &'life2 str, include_balances: bool, version: &'life3 VersionParam, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ProtocolStateRequestResponse, RPCError>> + Send + 'async_trait>> where T: AsRef<str> + Sync + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_all_tokens<'life0, 'async_trait>( &'life0 self, chain: Chain, min_quality: Option<i32>, traded_n_days_ago: Option<u64>, chunk_size: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<ResponseToken>, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_component_tvl_paginated<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ComponentTvlRequestBody, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ComponentTvlRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_traced_entry_points_paginated<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, chain: Chain, protocol_system: &'life1 str, component_ids: &'life2 [String], chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<TracedEntryPointRequestResponse, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... }
}

Required Methods§

Source

fn get_contract_state<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 StateRequestBody, ) -> Pin<Box<dyn Future<Output = Result<StateRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves a snapshot of contract state.

Source

fn get_protocol_components<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolComponentsRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolComponentRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_protocol_states<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolStateRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolStateRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_tokens<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TokensRequestBody, ) -> Pin<Box<dyn Future<Output = Result<TokensRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

This function returns only one chunk of tokens. To get all tokens please call get_all_tokens.

Source

fn get_protocol_systems<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolSystemsRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ProtocolSystemsRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_component_tvl<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ComponentTvlRequestBody, ) -> Pin<Box<dyn Future<Output = Result<ComponentTvlRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_traced_entry_points<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 TracedEntryPointRequestBody, ) -> Pin<Box<dyn Future<Output = Result<TracedEntryPointRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn get_contract_state_paginated<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chain: Chain, ids: &'life1 [Bytes], protocol_system: &'life2 str, version: &'life3 VersionParam, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<StateRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_protocol_components_paginated<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ProtocolComponentsRequestBody, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ProtocolComponentRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_protocol_states_paginated<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, chain: Chain, ids: &'life1 [T], protocol_system: &'life2 str, include_balances: bool, version: &'life3 VersionParam, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ProtocolStateRequestResponse, RPCError>> + Send + 'async_trait>>
where T: AsRef<str> + Sync + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_all_tokens<'life0, 'async_trait>( &'life0 self, chain: Chain, min_quality: Option<i32>, traded_n_days_ago: Option<u64>, chunk_size: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<ResponseToken>, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_component_tvl_paginated<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ComponentTvlRequestBody, chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<ComponentTvlRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_traced_entry_points_paginated<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, chain: Chain, protocol_system: &'life1 str, component_ids: &'life2 [String], chunk_size: usize, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<TracedEntryPointRequestResponse, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§