mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 16:51:34 +00:00
feat: introduce libp2p-identity
crate
This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`. Resolves https://github.com/libp2p/rust-libp2p/issues/3349. Pull-Request: #3350.
This commit is contained in:
@ -23,7 +23,8 @@ use crate::ConnectionId;
|
||||
use libp2p_core::connection::Endpoint;
|
||||
use libp2p_core::multiaddr::Protocol;
|
||||
use libp2p_core::multihash::Multihash;
|
||||
use libp2p_core::{Multiaddr, PeerId};
|
||||
use libp2p_core::Multiaddr;
|
||||
use libp2p_identity::PeerId;
|
||||
use std::num::NonZeroU8;
|
||||
|
||||
/// Options to configure a dial to a known or unknown peer.
|
||||
@ -52,7 +53,7 @@ impl DialOpts {
|
||||
///
|
||||
/// ```
|
||||
/// # use libp2p_swarm::dial_opts::{DialOpts, PeerCondition};
|
||||
/// # use libp2p_core::PeerId;
|
||||
/// # use libp2p_identity::PeerId;
|
||||
/// DialOpts::peer_id(PeerId::random())
|
||||
/// .condition(PeerCondition::Disconnected)
|
||||
/// .addresses(vec!["/ip6/::1/tcp/12345".parse().unwrap()])
|
||||
@ -327,7 +328,7 @@ impl WithoutPeerIdWithAddress {
|
||||
///
|
||||
/// ```
|
||||
/// # use libp2p_swarm::dial_opts::{DialOpts, PeerCondition};
|
||||
/// # use libp2p_core::PeerId;
|
||||
/// # use libp2p_identity::PeerId;
|
||||
/// #
|
||||
/// DialOpts::peer_id(PeerId::random())
|
||||
/// .condition(PeerCondition::Disconnected)
|
||||
|
Reference in New Issue
Block a user