Trait ethportal_api::Discv5ApiClient
source · pub trait Discv5ApiClient: ClientT {
fn node_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>
where
Self: Sync + 'async_trait,
'life0: 'async_trait,
{ ... }
fn update_node_info<'life0, 'async_trait>(
&'life0 self,
socket_addr: String,
is_tcp: Option<bool>
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>
where
Self: Sync + 'async_trait,
'life0: 'async_trait,
{ ... }
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 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,
{ ... }
}Expand description
Client implementation for the Discv5Api RPC API.
Provided Methods§
sourcefn node_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn node_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns ENR and Node ID information of the local discv5 node.
sourcefn update_node_info<'life0, 'async_trait>(
&'life0 self,
socket_addr: String,
is_tcp: Option<bool>
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn update_node_info<'life0, 'async_trait>(
&'life0 self,
socket_addr: String,
is_tcp: Option<bool>
) -> Pin<Box<dyn Future<Output = RpcResult<NodeInfo>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Update the socket address of the local node record.
sourcefn 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 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 discv5 routing table.
sourcefn 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 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 routing table.
sourcefn 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 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.
sourcefn 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 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 routing table.
sourcefn 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 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.