resolve_peer_id

Function resolve_peer_id 

Source
pub(crate) async fn resolve_peer_id(
    destination: &str,
    context: &CommandContext,
) -> Result<PeerId>
Expand description

Resolves a PeerId from a string, which can be either a direct PeerId or a friend’s nickname.

§Arguments

  • destination - The string to resolve (Peer ID or nickname).
  • context - The CommandContext for accessing friend information.

§Returns

A Result containing the resolved PeerId or an error if the peer cannot be found.