RPCClient

Trait RPCClient 

Source
pub trait RPCClient: Send + Sync {
Show 15 methods // Required methods fn compression(&self) -> bool; 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; fn get_snapshots<'a, 'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SnapshotParameters<'a>, chunk_size: Option<usize>, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<Snapshot, RPCError>> + Send + 'async_trait>> where Self: 'async_trait, 'a: '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: Option<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: Option<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: Option<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: Option<usize>, concurrency: 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: Option<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: Option<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 compression(&self) -> bool

Returns whether compression is enabled for requests.

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,

Source

fn get_snapshots<'a, 'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SnapshotParameters<'a>, chunk_size: Option<usize>, concurrency: usize, ) -> Pin<Box<dyn Future<Output = Result<Snapshot, RPCError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: '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: Option<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,

Retrieves a snapshot of contract state for a set of contract IDs. If the chunk_size is None, it defaults to the maximum page size

Source

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

Retrieves protocol components. If the chunk_size is None, it defaults to the maximum page size.

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: Option<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,

Retrieves protocol states for a set of protocol IDs. If the chunk_size is None, it defaults to the maximum page size.

Source

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

Retrieves all tokens matching the given criteria. If the chunk_size is None, it defaults to the maximum page size.

Source

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

Retrieves component TVL for a set of component IDs. If the chunk_size is None, it defaults to the maximum page size.

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: Option<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,

Retrieves traced entry points for a set of component IDs. If the chunk_size is None, it defaults to the maximum page size.

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§