pub trait HistoryNetworkApiClient: ClientT {
Show 17 methods // Provided methods fn routing_table_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<RoutingTableInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn radius<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<DataRadius>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn add_enr<'life0, 'async_trait>( &'life0 self, enr: Enr ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<Enr>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn delete_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn lookup_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId, enr_seq: Option<u32> ) -> Pin<Box<dyn Future<Output = RpcResult<Enr>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn ping<'life0, 'async_trait>( &'life0 self, enr: Enr, data_radius: Option<DataRadius> ) -> Pin<Box<dyn Future<Output = RpcResult<PongInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn find_nodes<'life0, 'async_trait>( &'life0 self, enr: Enr, distances: Vec<u16> ) -> Pin<Box<dyn Future<Output = RpcResult<FindNodesInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn recursive_find_nodes<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Enr>>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn find_content<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<ContentInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn recursive_find_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<HistoryContentItem>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn trace_recursive_find_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<TraceContentInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn paginate_local_content_keys<'life0, 'async_trait>( &'life0 self, offset: u64, limit: u64 ) -> Pin<Box<dyn Future<Output = RpcResult<PaginateLocalContentInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn gossip<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey, content_value: HistoryContentItem ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<AcceptInfo>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn store<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey, content_value: HistoryContentItem ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn local_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<HistoryContentItem>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Client implementation for the HistoryNetworkApi RPC API.

Provided Methods§

source

fn routing_table_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<RoutingTableInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns meta information about overlay routing table.

source

fn radius<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<DataRadius>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns meta information about overlay routing table.

source

fn add_enr<'life0, 'async_trait>( &'life0 self, enr: Enr ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Write an Ethereum Node Record to the overlay routing table.

source

fn get_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<Enr>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch the latest ENR associated with the given node ID.

source

fn delete_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Delete Node ID from the overlay routing table.

source

fn lookup_enr<'life0, 'async_trait>( &'life0 self, node_id: NodeId, enr_seq: Option<u32> ) -> Pin<Box<dyn Future<Output = RpcResult<Enr>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch the ENR representation associated with the given Node ID and optional sequence number.

source

fn ping<'life0, 'async_trait>( &'life0 self, enr: Enr, data_radius: Option<DataRadius> ) -> Pin<Box<dyn Future<Output = RpcResult<PongInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a PING message to the designated node and wait for a PONG response

source

fn find_nodes<'life0, 'async_trait>( &'life0 self, enr: Enr, distances: Vec<u16> ) -> Pin<Box<dyn Future<Output = RpcResult<FindNodesInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a FINDNODES request for nodes that fall within the given set of distances, to the designated peer and wait for a response

source

fn recursive_find_nodes<'life0, 'async_trait>( &'life0 self, node_id: NodeId ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Enr>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Lookup a target node within in the network

source

fn find_content<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<ContentInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send FINDCONTENT message to get the content with a content key.

source

fn recursive_find_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<HistoryContentItem>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Lookup a target content key in the network

source

fn trace_recursive_find_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<TraceContentInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Lookup a target content key in the network. Return tracing info.

source

fn paginate_local_content_keys<'life0, 'async_trait>( &'life0 self, offset: u64, limit: u64 ) -> Pin<Box<dyn Future<Output = RpcResult<PaginateLocalContentInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Pagination of local content keys

source

fn gossip<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey, content_value: HistoryContentItem ) -> Pin<Box<dyn Future<Output = RpcResult<u32>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send the provided content item to interested peers. Clients may choose to send to some or all peers. Return the number of peers that the content was gossiped to.

source

fn offer<'life0, 'async_trait>( &'life0 self, enr: Enr, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<AcceptInfo>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send an OFFER request with given ContentKey, to the designated peer and wait for a response. Returns the content keys bitlist upon successful content transmission or empty bitlist receive.

source

fn store<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey, content_value: HistoryContentItem ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Store content key with a content data to the local database.

source

fn local_content<'life0, 'async_trait>( &'life0 self, content_key: HistoryContentKey ) -> Pin<Box<dyn Future<Output = RpcResult<HistoryContentItem>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get a content from the local database

Implementors§

source§

impl<TypeJsonRpseeInteral> HistoryNetworkApiClient for TypeJsonRpseeInteralwhere TypeJsonRpseeInteral: ClientT,